-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
junos_config: Fails with FileNotFoundError #55
Comments
This looks like an issue with the connection setting. The group vars specify
Try removing For more help with networking issues, please reach out to the Ansible Networking community: https://github.com/ansible-collections/junipernetworks.junos#contributing-to-this-collection |
Ok . I will try that ..
The playbook is meant to connect to the remote device .
Thank you Sam ..
From: Sam Doran [mailto:notifications@github.com]
Sent: 09 June 2020 15:24
To: ansible-collections/junipernetworks.junos <junipernetworks.junos@noreply.github.com>
Cc: Akemu,E,Edirivere,VRC1 R <edirivere.akemu@bt.com>; Author <author@noreply.github.com>
Subject: Re: [ansible-collections/junipernetworks.junos] junos_config: Fails with FileNotFoundError (#55)
This looks like an issue with the connection setting. The group vars specify ansible_network_os=junos but the play specifies connection: local. Based on the output of the playbook run, it is connecting to your control node, not the remote device.
<172.16.203.121> ESTABLISH LOCAL CONNECTION FOR USER: gefela
Try removing connection: local from the play.
For more help with networking issues, please reach out to the Ansible Networking community: https://github.com/ansible-collections/junipernetworks.junos#contributing-to-this-collection
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#55 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHJDTSPMIBQ6T4VUKYCDR5DRVZAYRANCNFSM4NOZFP6A>.
|
I have left out connection: local from the play. This is the result ..
|
I have also changed this but it does not make any difference [juniper:vars] |
Try using:
in your inventory file |
Moreover, I see
Is ncclient installed? |
ncclient is installed .I have also changed this
still the same error message
|
So unfortunately I can't help you with this with the information we have here. There are a number of issues with the logs that I am seeing... running ansible as root being one of them. But more importantly, there is a lack of consistency among the different runs that makes it very hard to draw any conclusions. There have been three different python interpreters used over the three runs of this playbook. First Each run is also using a completely different install of ansible... the second obviously being installed for python2.7, but the first appears to have been installed for the root user, and the last system-wide. That said, none of this should really matter (except maybe My suggestion is to delete |
@gefela In addition to detailed logs ,Could you show how your syslog_config.txt file looks like. |
@rohitthakur2590 This is the contents of syslog_config.txt [gefelas@localhost ansible_junos]$ cat files/syslog_config.txt The rest are similar to what is in this repo |
@Qalthos ; I haven't specified the log path in the ansible.cfg file . However I have done this
|
Sorry, yes you need to set a log path. I had honestly forgotten that wasn't a default. Additionally, you are still using
|
Here is the output from the command |
Alright, now we're getting somewhere. The Indeed, running a similar playbook as root with a private_key_file that doesn't exist gives me the |
I have tried running ansible as a non-root user but it is still the same |
The inventory is now as follows [juniper] [juniper:vars] |
The error message is a bit different now |
manage to resolve using ansible_user and ansible_password properly in inventory |
SUMMARY
junos_config: junos playbook fails with FileNotFoundError
ISSUE TYPE
COMPONENT NAME
junos_config
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
The results should be as a resultof comparing the src directory against the configuration of juniper vsrx ... The src files are similar to these
https://github.com/gefela/ansible_junos/tree/master/files
ACTUAL RESULTS
When I run this command .
ansible-playbook -i inventory junos_config_new.yml --check -vvv
I get the following error message .
The text was updated successfully, but these errors were encountered: