problem z konfiguracja Ansible Temat rozwiązany

Wszystko o automatyzacji w sieciach i DC
Wiadomość
Autor
coffeechewer
member
member
Posty: 24
Rejestracja: 14 maja 2015, 11:14

problem z konfiguracja Ansible

#1

#1 Post autor: coffeechewer »

Witam,

Probuje zbudować Ansible do użytku w labie. Ping działa:

ansible@automation-srv:/etc/ansible$ ansible -m ping all
192.168.0.39 | SUCCESS => {
"changed": false,
"ping": "pong"
}
192.168.0.38 | SUCCESS => {
"changed": false,
"ping": "pong"
}
192.168.0.40 | SUCCESS => {
"changed": false,
"ping": "pong"
}

problem jest tutaj:

ansible@automation-srv:/etc/ansible$ ansible-playbook test.yml

PLAY [Test Ansible commands] ********************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************
[WARNING]: Ignoring timeout(10) for ansible.legacy.iosxr_facts
[WARNING]: Ignoring timeout(10) for ansible.legacy.ios_facts
[WARNING]: Ignoring timeout(10) for ansible.legacy.nxos_facts
fatal: [192.168.0.39]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.ios_facts": {"failed": true, "invocation": {"module_args": {"available_network_resources": false, "gather_network_resources": null, "gather_subset": ["!config"], "provider": null}}, "msg": "[Errno 21] Is a directory: '/home/ansible/.ssh'"}}, "msg": "The following modules failed to execute: ansible.legacy.ios_facts\n"}
fatal: [192.168.0.38]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.iosxr_facts": {"failed": true, "invocation": {"module_args": {"available_network_resources": false, "gather_network_resources": null, "gather_subset": ["!config"], "provider": null}}, "msg": "[Errno 21] Is a directory: '/home/ansible/.ssh'"}}, "msg": "The following modules failed to execute: ansible.legacy.iosxr_facts\n"}
fatal: [192.168.0.40]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.nxos_facts": {"failed": true, "invocation": {"module_args": {"available_network_resources": false, "gather_network_resources": null, "gather_subset": ["!config"], "provider": null}}, "msg": "[Errno 21] Is a directory: '/home/ansible/.ssh'"}}, "msg": "The following modules failed to execute: ansible.legacy.nxos_facts\n"}

PLAY RECAP **************************************************************************************************************************************************************************
192.168.0.38 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
192.168.0.39 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
192.168.0.40 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

dodam ze SSH z urządzenia działa.

Proszę o opinie.

Awatar użytkownika
peper
CCIE / Site Admin
CCIE / Site Admin
Posty: 5005
Rejestracja: 13 sie 2004, 12:19
Lokalizacja: Warsaw, PL
Kontakt:

Re: problem z konfiguracja Ansible

#2

#2 Post autor: peper »

Odwołujesz się do folderu z kluczami SSH a nie do konkretnego klucza. Poza tym nie używaj modułów legacy, masz cały namespace cisco w kolekcji ansible.
Szkoła DevNet: https://szkoladevnet.pl


Facebook: https://www.facebook.com/Piotr.Wojciechowski.CCIE
LinkedIn: https://www.linkedin.com/in/peper
Twitter: https://www.twitter.com/PiotrW_CCIE

"Zapomniałem że od kilku lat wszyscy giną jakby nigdy ich nie miało być
w stu tysiącach jednakowych miast giną jak psy"

coffeechewer
member
member
Posty: 24
Rejestracja: 14 maja 2015, 11:14

Re: problem z konfiguracja Ansible

#3

#3 Post autor: coffeechewer »

Dzięki za szybka odpowiedz, ciężkie te pierwsze kroki :)

działa, happy days!

ODPOWIEDZ