# Need help to run my first ansible playbook

**URL:** <https://forum.ansible.com/t/need-help-to-run-my-first-ansible-playbook/31731>\
**Category:** Ansible Project\
**Created:** [November 27, 2019, 3:26am UTC](https://forum.ansible.com/t/need-help-to-run-my-first-ansible-playbook/31731 "2019-11-27T03:26:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard2](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@Richard2](https://forum.ansible.com/u/Richard2)\
**Post date:** [November 27, 2019, 3:26am UTC](https://forum.ansible.com/t/need-help-to-run-my-first-ansible-playbook/31731/1 "2019-11-27T03:26:55Z")

</div>

I need help to run write ansible playbook to run show commands on Cisco Starent devices  
And I’m running into some errors

Playbook

---

<div class="post-metadata">

**Author:** ![Michael3](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Michael3](https://forum.ansible.com/u/Michael3)\
**Post date:** [November 27, 2019, 3:42am UTC](https://forum.ansible.com/t/need-help-to-run-my-first-ansible-playbook/31731/2 "2019-11-27T03:42:19Z")

</div>

It appears you may have wrongly mapped the attribute - commands beneath the ios\_commands module in task “Run Show Command”

[see examples here](https://docs.ansible.com/ansible/latest/modules/ios_command_module.html#examples) and pay attention to indentation, the line “tasks” appears to be wrongly indented also.

I would try the following:

---

<div class="post-metadata">

**Author:** ![Richard2](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@Richard2](https://forum.ansible.com/u/Richard2)\
**Post date:** [November 27, 2019, 4:29am UTC](https://forum.ansible.com/t/need-help-to-run-my-first-ansible-playbook/31731/3 "2019-11-27T04:29:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [November 27, 2019, 8:17am UTC](https://forum.ansible.com/t/need-help-to-run-my-first-ansible-playbook/31731/4 "2019-11-27T08:17:56Z")

</div>

> 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  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke
