how to solve ansible connexion problem to a junos device?

10 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, and I need to backup a junos device configuration, I tried the solution bellow


#### host 
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=XXXX
        passwd=xxxx
        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(1aa.bb.cc.dd)"}
to retry, use: --limit @/etc/ansible/playbooks/test.retr

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