# Task YML Synthax

**URL:** <https://forum.ansible.com/t/task-yml-synthax/16454>\
**Category:** Ansible Project\
**Created:** [October 7, 2014, 1:23pm UTC](https://forum.ansible.com/t/task-yml-synthax/16454 "2014-10-07T13:23:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoann\_DAVID](https://avatars.discourse-cdn.com/v4/letter/y/85e7bf/32.png) [@Yoann\_DAVID](https://forum.ansible.com/u/Yoann_DAVID)\
**Post date:** [October 7, 2014, 1:23pm UTC](https://forum.ansible.com/t/task-yml-synthax/16454/1 "2014-10-07T13:23:27Z")

</div>

Hello,

depending of the playbook, the modules attribute’s in task are differently written :

Colon synthax :

> - name: APT | Update the general configuration (/etc/apt/apt.conf.ds/10general) |
> - |  
> template: |  
> src: etc\_apt\_apt.conf.d\_10general.j2 |  
> dest: /etc/apt/apt.conf.d/10general |  
> owner: root |  
> group: root |  
> mode: 0644 |

Equal synthax :

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 8, 2014, 12:45pm UTC](https://forum.ansible.com/t/task-yml-synthax/16454/2 "2014-10-08T12:45:04Z")

</div>

The “=” short form is often more concise for simple things that can be put all on one line

- copy: src=a dest=/tmp/b mode=0644 owner=root

etc

Both are fine and neither will be deprecated.

The colon form is needed to pass structured data, as is required by some modules, like the ec2 modules

---

<div class="post-metadata">

**Author:** ![Yoann\_DAVID](https://avatars.discourse-cdn.com/v4/letter/y/85e7bf/32.png) [@Yoann\_DAVID](https://forum.ansible.com/u/Yoann_DAVID)\
**Post date:** [October 8, 2014, 12:54pm UTC](https://forum.ansible.com/t/task-yml-synthax/16454/3 "2014-10-08T12:54:31Z")

</div>

Thanks a lot for your answer.
