# which syntax is right for latest ansible

**URL:** <https://forum.ansible.com/t/which-syntax-is-right-for-latest-ansible/17816>\
**Category:** Ansible Project\
**Created:** [March 23, 2015, 6:30pm UTC](https://forum.ansible.com/t/which-syntax-is-right-for-latest-ansible/17816 "2015-03-23T18:30:19Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [March 23, 2015, 6:30pm UTC](https://forum.ansible.com/t/which-syntax-is-right-for-latest-ansible/17816/1 "2015-03-23T18:30:19Z")

</div>

Which syntax is correct for latest ansible?

for example:

sudo: True

or

sudo: yes

Although both are working fine, but which is the recommended way from latest ansible? using True/False or yes/no?

Thanks,

---

<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:** [March 23, 2015, 6:36pm UTC](https://forum.ansible.com/t/which-syntax-is-right-for-latest-ansible/17816/2 "2015-03-23T18:36:55Z")

</div>

Both are fine. According to YAML they are both booleans. You can see what YAML treats as booleans at [http://yaml.org/type/bool.html](http://yaml.org/type/bool.html)

Basically it is:

y, Y, yes, Yes, YES, n, N, no, No, NO, true, True, TRUE, false, False, FALSE, on, On, ON, off, Off, OFF
