# playbook YAML hash for module flags

**URL:** <https://forum.ansible.com/t/playbook-yaml-hash-for-module-flags/12609>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [March 31, 2013, 9:18pm UTC](https://forum.ansible.com/t/playbook-yaml-hash-for-module-flags/12609 "2013-03-31T21:18:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 31, 2013, 9:18pm UTC](https://forum.ansible.com/t/playbook-yaml-hash-for-module-flags/12609/1 "2013-03-31T21:18:42Z")

</div>

Looks like you are indenting too much.

- name: “creating a config file from a rendered template”  
template:  
dest: /tmp/foobar.conf  
group: bar  
mode: 493  
owner: foo  
src: /home/vagrant/ansible-templates/foobar.j2

Works.

[yamllint.com](http://yamllint.com) can be useful at times.

---

<div class="post-metadata">

**Author:** ![Jaime\_Gago1](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Jaime\_Gago1](https://forum.ansible.com/u/Jaime_Gago1)\
**Post date:** [April 1, 2013, 5:01am UTC](https://forum.ansible.com/t/playbook-yaml-hash-for-module-flags/12609/2 "2013-04-01T05:01:36Z")

</div>

It wasn’t the indention (I had tried several ones before) it was the missing spaces after the columns.  
so

- name: “creating a config file from a rendered template”  
template:  
dest: /tmp/foobar.conf  
group: bar  
mode: 493  
owner: foo  
src: /home/vagrant/ansible-templates/foobar.j2

works

but

- name: “creating a config file from a rendered template”  
template:  
dest:/tmp/foobar.conf  
group:bar  
mode:493  
owner:foo  
src:/home/vagrant/ansible-templates/foobar.j2

doesn’t

Unfortunately [yamllint.com](http://yamllint.com) gives valid syntax for both versions (I had tried that too thanks to the links on the YAML chapter on the website =) )

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 1, 2013, 12:54pm UTC](https://forum.ansible.com/t/playbook-yaml-hash-for-module-flags/12609/3 "2013-04-01T12:54:21Z")

</div>

Yeah, when I tried your original it said it was valid but evaluated to  
something completely different once you clicked "save", which was how  
I could tell.
