# Unable to run playbook (Syntax Error)

**URL:** <https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416>\
**Category:** Ansible Project\
**Created:** [April 30, 2018, 9:26pm UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416 "2018-04-30T21:26:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_Hill](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Joshua\_Hill](https://forum.ansible.com/u/Joshua_Hill)\
**Post date:** [April 30, 2018, 9:26pm UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/1 "2018-04-30T21:26:30Z")

</div>

Can someone show me where my mistakes are with the below playbook? When i try to run this playbook it tells me it fails at

- name: run multiple commands on remote nodes  
^ here

`

---

<div class="post-metadata">

**Author:** ![Karl\_Auer](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Post date:** [April 30, 2018, 9:35pm UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/2 "2018-04-30T21:35:29Z")

</div>

“hosts” should come before “name”. I think.

---

<div class="post-metadata">

**Author:** ![Joshua\_Hill](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Joshua\_Hill](https://forum.ansible.com/u/Joshua_Hill)\
**Post date:** [April 30, 2018, 9:48pm UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/3 "2018-04-30T21:48:22Z")

</div>

Same issue

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 30, 2018, 11:13pm UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/4 "2018-04-30T23:13:32Z")

</div>

hosts/name order does not matter, indentation does seem to be off, -  
debug should start at same level as the previous task

---

<div class="post-metadata">

**Author:** ![Richard\_Hector](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Richard\_Hector](https://forum.ansible.com/u/Richard_Hector)\
**Post date:** [May 1, 2018, 1:27am UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/5 "2018-05-01T01:27:58Z")

</div>

I think the 3 lines under "- name" need to be indented level with the 'n'.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Hector](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Richard\_Hector](https://forum.ansible.com/u/Richard_Hector)\
**Post date:** [May 1, 2018, 1:29am UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/6 "2018-05-01T01:29:54Z")

</div>

Oh, whoops - I was looking at the wrong '- name'

Richard

---

<div class="post-metadata">

**Author:** ![Joshua\_Hill](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Joshua\_Hill](https://forum.ansible.com/u/Joshua_Hill)\
**Post date:** [May 1, 2018, 4:45am UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/7 "2018-05-01T04:45:07Z")

</div>

Tried it without the register and still no go!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 1, 2018, 1:43pm UTC](https://forum.ansible.com/t/unable-to-run-playbook-syntax-error/27416/8 "2018-05-01T13:43:53Z")

</div>

so from emai (not a good source) the indentations were off in many  
places, this is a 'fixed' version of your play:

- name: get version  
&nbsp;&nbsp;hosts: all  
&nbsp;&nbsp;gather\_facts: false  
&nbsp;&nbsp;connection: local  
&nbsp;&nbsp;tasks:

&nbsp;&nbsp;&nbsp;- name: run multiple commands on remote nodes  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ios\_command:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;commands:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- show version  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- show ip int brief  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register: print\_output

&nbsp;&nbsp;&nbsp;- debug: var=print\_output.stdout\_lines
