On 11/27/19 5:29 AM, 'Richard' via Ansible Project wrote:
> Thanks for your help Michael.
> The playbook is working now but ran into a another error
> 
> PLAY [Run Show Command] 
> ************************************************************************
> 
> TASK [run show command] 
> ************************************************************************
> fatal: [all]: FAILED! => {"msg": "[Errno -3] Temporary failure in name 
> resolution"}
>         to retry, use: --limit @/home/ansible/test_playbook.retry
> 
> PLAY RECAP 
> *************************************************************************************
> all                        : ok=0    changed=0    unreachable=0    failed=1
> 

Your inventory is broken: [WARNING]: Found both group and host with same name: 
all

Regards
        Racke

> 
> On Tuesday, November 26, 2019 at 10:26:55 PM UTC-5, Richard wrote:
> 
>     I need help to run write ansible playbook to run show commands on Cisco 
> Starent devices
>     And I'm running into some errors
> 
>     Playbook
>      ---
> 
>      - name: Run Show Command
>        hosts: all
>        connection: network_cli
>        gather_facts: no
> 
>       tasks:
>         - name: Gather Fact on all hosts
>           ios_facts:
> 
>         - name: Run show Command
>           ios_commands:
>                  - commands: "show alarm outstanding"
> 
>      ---
> 
> 
>     Errror
> 
>     ansible@denchpw26:~$ sudo nano CiscoCheck_playbook.ymlCSR, -u a
>     ansible@denchpw26:~$ clear
>     ansible@denchpw26:~$ ansible-playbook -i all, -u ansible -k -e 
> ansible_network_os=ios CiscoCheck_playbook.yml
>     SSH password:
>      [WARNING]: Found both group and host with same name: all
> 
>     ERROR! Syntax Error while loading YAML.
>       mapping values are not allowed in this context
> 
>     The error appears to have been in 
> '/home/ansible/CiscoCheck_playbook.yml': line 3, column 8, but may
>     be elsewhere in the file depending on the exact syntax problem.
> 
>     The offending line appears to be:
> 
> 
>      - name: Run Show Command
>            ^ here
> 
> -- 
> 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 
> <mailto:ansible-project+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/bee9c34b-6949-49a0-99c9-e4bfeebd26f3%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/bee9c34b-6949-49a0-99c9-e4bfeebd26f3%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/55d621f3-4653-96b4-1a30-f5a7b03fafdf%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to