# indentation help

**URL:** <https://forum.ansible.com/t/indentation-help/35783>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [September 24, 2021, 3:08pm UTC](https://forum.ansible.com/t/indentation-help/35783 "2021-09-24T15:08:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon\_clarke](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@simon\_clarke](https://forum.ansible.com/u/simon_clarke)\
**Post date:** [September 24, 2021, 3:08pm UTC](https://forum.ansible.com/t/indentation-help/35783/1 "2021-09-24T15:08:30Z")

</div>

Hi All,

Im new to ansible and want to underestand the syntax better, i have the below file running on my Ubuntu machine but im struggling with knowing where to use the " - " sign as i previously though it was just for “- name”.

im confused with the below lines of config

register: print\_output

- debug: var=print\_output.stdout\_lines

why does the debug need a “-” infront of it and also why does it need to be indented from the previous line " register: print\_output " ?

appologies that this is basic stuff and thanks in advance for any help

Simon

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 24, 2021, 3:17pm UTC](https://forum.ansible.com/t/indentation-help/35783/2 "2021-09-24T15:17:12Z")

</div>

The `tasks:` header in a play, or just the file itself for a role, is a YAML list. YAML lists are indicated by the first line of the element starting with `- `

See the following links for additional information:

- [https://docs.ansible.com/ansible-core/2.11/user\_guide/playbooks\_intro.html#playbook-execution](https://docs.ansible.com/ansible-core/2.11/user_guide/playbooks_intro.html#playbook-execution)
- [https://docs.ansible.com/ansible-core/2.11/reference\_appendices/YAMLSyntax.html](https://docs.ansible.com/ansible-core/2.11/reference_appendices/YAMLSyntax.html)

---

<div class="post-metadata">

**Author:** ![simon\_clarke](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@simon\_clarke](https://forum.ansible.com/u/simon_clarke)\
**Post date:** [September 24, 2021, 3:23pm UTC](https://forum.ansible.com/t/indentation-help/35783/3 "2021-09-24T15:23:07Z")

</div>

Thanks for taking the time to reply much appreciated
