Comments (9)
junos_get_config
is not part of ntc-ansible
. Anyway, this error is often shown when Ansible can't find the module you're trying to use. Makes sure the module called junos_get_config
is available to Ansible.
Closing this.
from ntc-ansible.
@GGabriele What is platform for devices running Junos OS?
Example: Cisco IOS have cisco_ios (in save_config is cisco_ios_ssh)
from ntc-ansible.
juniper_junos
for ntc_show_command, juniper_junos_netconf
for others.
from ntc-ansible.
I execute but error:
[haind4@monitornet61 ansible]$ ansible-playbook ntc_junos_backup.yml --ask-vault-pass
ult password:
รขโยฝ
PLAY [BACKUP CONFIGS] **********************************************************TASK [OBTAIN LOGIN CREDENTIALS] ************************************************
ok: [atmtest]TASK [Save config file to backup] **********************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: jnpr.junos.exception.ConnectTimeoutError: ConnectTimeoutError(10.192.254.201)
fatal: [atmtest]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_J3q7so/ansible_module_ntc_save_config.py", line 256, in \n main()\n File "/tmp/ansible_J3q7so/ansible_module_ntc_save_config.py", line 228, in main\n device = ntc_device(device_type, host, username, password, **kwargs)\n File "/usr/lib/python2.7/site-packages/pyntc/init.py", line 35, in ntc_device\n return device_class(*args, **kwargs)\n File "/usr/lib/python2.7/site-packages/pyntc/devices/jnpr_device.py", line 34, in init\n self.open()\n File "/usr/lib/python2.7/site-packages/pyntc/devices/jnpr_device.py", line 46, in open\n self.native.open()\n File "/usr/lib/python2.7/site-packages/jnpr/junos/device.py", line 1200, in open\n raise EzErrors.ConnectTimeoutError(self)\njnpr.junos.exception.ConnectTimeoutError: ConnectTimeoutError(10.192.254.201)\n", "module_stdout": "", "msg": "MODULE FAILURE"}
to retry, use: --limit @/etc/ansible/ntc_junos_backup.retryPLAY RECAP *********************************************************************
atmtest : ok=1 changed=0 unreachable=0 failed=1
This is my playbook:
name: BACKUP CONFIGS
hosts: junos
gather_facts: False
connection: localtasks:
name: OBTAIN LOGIN CREDENTIALS
include_vars: secrets_tuantv.yamlname: Save config file to backup
ntc_save_config:
platform: juniper_junos_netconf
host: "{{ ansible_host }}"
username: "{{ creds['username'] }}"
password: "{{ creds['password'] }}"
local_file: /home/haind4/ansible/backup/{{inventory_hostname}}.cfg
register: resultsdebug: var=results
from ntc-ansible.
ConnectTimeoutError(10.192.254.201)
it means your device is not reachable...makes sure it is and that you're using the right credentials.
from ntc-ansible.
@GGabriele I can ssh by command: ssh [email protected] but execute with playbook error
from ntc-ansible.
Check if NETCONF port is open on the device https://www.juniper.net/techpubs/en_US/junos/topics/reference/configuration-statement/port-edit-system-services-netconf.html
from ntc-ansible.
I just config SSH (22) ? no config NETCONF port, it's can be default port (830)
from ntc-ansible.
Yeah, I asked to check NETCONF port on Juniper as the module uses NETCONF, not SSH.
Another thing you can do is to test Juniper PyEZ API and see if it works.
Again, due to the error it doesn't seem to be an issue related to ntc-ansible.
from ntc-ansible.
Related Issues (20)
- ntc_file_copy - module object has no attribute FullLoader HOT 3
- Module failure when trying to use 'ntc_show_command' HOT 2
- ntc-templates module not references master HOT 1
- ntc_file_copy - msg: '''CiscoIosFileTransfer'' object has no attribute ''scp_conn''' HOT 2
- textfsm.TextFSMError HOT 8
- F5 errors HOT 7
- how to run ntc-ansible on Cisco ASA HOT 3
- setup.py: "ImportError No module named pathlib" HOT 3
- ntc_save_config is missing call to escalate privilege HOT 1
- ntc_show__command cant find netmiko HOT 6
- Remove Git Submodule for ntc-templates HOT 1
- Move into Ansible Collection HOT 2
- pyntc cannot import name ntc_device error HOT 3
- I can not run setup.py install. I have a newer version of SCP HOT 2
- Restructure to ansible collection HOT 1
- Add Proper CI HOT 2
- Add Proper Issues, Bugs, etc templates HOT 2
- Update Branching Strategy to Match NTC dev standards HOT 1
- Install ntc-ansible HOT 2
- Can't figure out how to make it work with netmiko HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntc-ansible.