Hi everybody,
I'm working on getting my hands on ansible to use it for network automation
purposes. I've a problem with a first simple script which is issuing a show
command on a switch.
I've to hosts defined in my hosts file /etc/ansible/hosts:
*[...]*
*[nxos]*
*10.20.5.26*
*10.20.5.27*
*[...]*
Now I have this simple playbook:
*---*
*- name: Execute show version on NX-OS Devices*
* hosts: nxos*
* gather_facts: no*
* tasks:*
* - raw: "show version"*
When I test my playbook I'm getting the following error:
*ansible-playbook playbooks/show_version.yml -vvv*
*PLAY [Execute show version on NX-OS Devices]
***********************************
*TASK: [raw show version]
*******************************************************
*<10.20.5.26> EXEC show version*
*failed: [10.20.5.26] => {"rc": 127}*
*stderr: /bin/sh: 1: show: not found*
*<10.20.5.27> EXEC show version*
*failed: [10.20.5.27] => {"rc": 127}*
*stderr: /bin/sh: 1: show: not found*
*FATAL: all hosts have already failed -- aborting*
*PLAY RECAP
*********************************************************************
* to retry, use: --limit @/root/show_version.retry*
*10.20.5.26 : ok=0 changed=0 unreachable=0
failed=1*
*10.20.5.27 : ok=0 changed=0 unreachable=0
failed=1*
This playbook was working perfect on Debian 9 and Ansible 2.2 or 2.3. Now
I'm testing this on Ansible 1.7.2, Debian 7 and Python 2.7.3.
It's looking like Ansible isn't able to connect to the networking devices
because it doesn't try to connect via SSH. Iwas looking through the
internet for some help but only found things like change your /bin/bash in
ansible.cfg file but this won't help me as I need to find out why Ansible
isn't able to get to the networking devices.
Thanks in advance.
Tobias
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/37f4ae9f-1cd4-4255-a056-67d439c1ec01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.