ansible is unable to connect to junos device

12 views
Skip to first unread message

fatimazahr...@gmail.com

unread,
Apr 20, 2017, 10:29:48 AM4/20/17
to Ansible Project
Hi all,
I'm new to ansible, I need to backup a junos device configuration,



###hosts

[junos]
aa.bb.cc.dd



#########playbook
---
- name: Get configuration
  hosts: all
  connection: local
  gather_facts: no
  roles:
    - Juniper.junos
  tasks:
    - name: Getting config ... please wait
      junos_get_config:
        host={{ inventory_hostname }}
        user=xxxxx
        passwd=xxxxxx
        dest=etc/ansible/Backups/{{ inventory_hostname }}.conf
        logfile=/tmp/changes.log



after running the playbook, I get the following Error!



PLAY [Get configuration] *******************************************************

TASK [Getting config ... please wait] ******************************************
fatal: [aa.bb.cc.dd]: FAILED! => {"changed": false, "failed": true, "msg": "unable to connect to aa.bb.cc.dd: ConnectTimeoutError(aa.bb.cc.dd)"}
to retry, use: --limit @/etc/ansible/playbooks/test.retry

PLAY RECAP *********************************************************************
aa.bb.cc.dd                : ok=0    changed=0    unreachable=0    failed=1  



 
How can I solve this problem?



Reply all
Reply to author
Forward
0 new messages