# recommended indent style for tasks

**URL:** <https://forum.ansible.com/t/recommended-indent-style-for-tasks/27420>\
**Category:** Ansible Project\
**Created:** [May 1, 2018, 11:37am UTC](https://forum.ansible.com/t/recommended-indent-style-for-tasks/27420 "2018-05-01T11:37:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josef\_Fortier](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@Josef\_Fortier](https://forum.ansible.com/u/Josef_Fortier)\
**Post date:** [May 1, 2018, 11:37am UTC](https://forum.ansible.com/t/recommended-indent-style-for-tasks/27420/1 "2018-05-01T11:37:09Z")

</div>

I’m modifying an EOL vim ansible plugin for my own use and am wondering about indent style. In the Ansible Intro to Playbooks doc ( [http://docs.ansible.com/ansible/latest/user\_guide/playbooks\_intro.html](http://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html) ) there are two separate styles on the same page:

At the start of the doc, each task item has it’s leading dash flush with the “task:” keyword indent.

But later on, in the “Basics” header there’s an alternate style, where each task item is indented a shift-width deeper then the “task:” keyword.

Both seem to work with python’s YAML parser.

The second example appears to be slightly more common. Is there a recommended style?

Is there a more common/consensus style?

---

<div class="post-metadata">

**Author:** ![Varun\_Chopra](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@Varun\_Chopra](https://forum.ansible.com/u/Varun_Chopra)\
**Post date:** [May 4, 2018, 6:13pm UTC](https://forum.ansible.com/t/recommended-indent-style-for-tasks/27420/2 "2018-05-04T18:13:40Z")

</div>

This is:

But later on, in the “Basics” header there’s an alternate style, where each task item is indented a shift-width deeper then the “task:” keyword.
