Hi All, I'm new to ansible. I'am trying to backup juniper routers configurations, i tried the following Yaml Script:
*---* *- 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=YYYYY* * passwd=XXXXX* * dest=/etc/ansible/Backups/{{ inventory_hostname }}.conf* * logfile=/tmp/changes.log* * port=22* the script works with the following host file hosts *aa.bb.cc.dd* *ee.ff.gg.hh* I want to backup the configuration, with the name of routers as conf file name (lissasfa.conf/ ag.conf), So I modified the host file as following; *lisssfa ansible_host=aa.bb.cc.dd* *ag ansible_host=ee.ff.gg.hh* I get this error, TASK [Getting config ... please wait] ****************************************** fatal: [lissasfa]: FAILED! => {"changed": false, "failed": true, "msg": "unable to connect to lissasfa: ConnectUnknownHostError(lissasfa)"} fatal: [ag]: FAILED! => {"changed": false, "failed": true, "msg": "unable to connect to ag: ConnectUnknownHostError(ag)"} to retry, use: --limit @/etc/ansible/playbooks/test.retry PLAY RECAP ********************************************************************* ag : ok=0 changed=0 unreachable=0 failed=1 lissasfa : ok=0 changed=0 unreachable=0 failed=1 have you any ideas about solving this issue ???? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8f05f479-8063-4ee8-b750-5ee0e21be01a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.