# ERROR! Syntax Error while loading YAML.   mapping values are not allowed in this context

**URL:** <https://forum.ansible.com/t/error-syntax-error-while-loading-yaml-mapping-values-are-not-allowed-in-this-context/30256>\
**Category:** Ansible Project\
**Created:** [May 3, 2019, 9:38am UTC](https://forum.ansible.com/t/error-syntax-error-while-loading-yaml-mapping-values-are-not-allowed-in-this-context/30256 "2019-05-03T09:38:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![opitz](https://avatars.discourse-cdn.com/v4/letter/o/87869e/32.png) [@opitz](https://forum.ansible.com/u/opitz)\
**Post date:** [May 3, 2019, 9:38am UTC](https://forum.ansible.com/t/error-syntax-error-while-loading-yaml-mapping-values-are-not-allowed-in-this-context/30256/1 "2019-05-03T09:38:51Z")

</div>

I have the following playbook:

---

<div class="post-metadata">

**Author:** ![Sebastian\_Meyer](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@Sebastian\_Meyer](https://forum.ansible.com/u/Sebastian_Meyer)\
**Post date:** [May 3, 2019, 9:44am UTC](https://forum.ansible.com/t/error-syntax-error-while-loading-yaml-mapping-values-are-not-allowed-in-this-context/30256/2 "2019-05-03T09:44:19Z")

</div>

You are missing a space here between the hyphen and name.

Sebastian

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [May 4, 2019, 2:14pm UTC](https://forum.ansible.com/t/error-syntax-error-while-loading-yaml-mapping-values-are-not-allowed-in-this-context/30256/3 "2019-05-04T14:14:43Z")

</div>

You can check if you have a valid syntax at

[http://www.yamllint.com/](http://www.yamllint.com/)

In YAML, sequences must have a dash followed by a space.
