# Inconsistent behavior of new-style variables?

**URL:** <https://forum.ansible.com/t/inconsistent-behavior-of-new-style-variables/12981>\
**Category:** Ansible Project\
**Created:** [June 18, 2013, 4:33pm UTC](https://forum.ansible.com/t/inconsistent-behavior-of-new-style-variables/12981 "2013-06-18T16:33:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slothrop](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@slothrop](https://forum.ansible.com/u/slothrop)\
**Post date:** [June 18, 2013, 4:33pm UTC](https://forum.ansible.com/t/inconsistent-behavior-of-new-style-variables/12981/1 "2013-06-18T16:33:35Z")

</div>

This is a syntax error at the closing brackets of {{ app\_root }}:

---

<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:** [June 18, 2013, 7:56pm UTC](https://forum.ansible.com/t/inconsistent-behavior-of-new-style-variables/12981/2 "2013-06-18T19:56:20Z")

</div>

If a YAML line starts with {{ you have to quote the line, because YAML thinks it may be a hash.

It’s not really a bug and is documented on the YAML syntax page (though that, I realize, is a bit off the beaten track).

---

<div class="post-metadata">

**Author:** ![slothrop](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@slothrop](https://forum.ansible.com/u/slothrop)\
**Post date:** [June 18, 2013, 10:26pm UTC](https://forum.ansible.com/t/inconsistent-behavior-of-new-style-variables/12981/3 "2013-06-18T22:26:38Z")

</div>

Ah, right there at the bottom of [http://www.ansibleworks.com/docs/YAMLSyntax.html](http://www.ansibleworks.com/docs/YAMLSyntax.html) in the Gotchas section. Thanks.
