# what's wrong with this?

**URL:** <https://forum.ansible.com/t/whats-wrong-with-this/26488>\
**Category:** Ansible Developer\
**Created:** [January 16, 2018, 1:06pm UTC](https://forum.ansible.com/t/whats-wrong-with-this/26488 "2018-01-16T13:06:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranay\_Nanda](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@Pranay\_Nanda](https://forum.ansible.com/u/Pranay_Nanda)\
**Post date:** [January 16, 2018, 1:06pm UTC](https://forum.ansible.com/t/whats-wrong-with-this/26488/1 "2018-01-16T13:06:49Z")

</div>

what’s wrong with this?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [January 16, 2018, 5:33pm UTC](https://forum.ansible.com/t/whats-wrong-with-this/26488/2 "2018-01-16T17:33:33Z")

</div>

You have syntax errors. I recommend using a site like [yamllint.com](http://yamllint.com) to make sure your playbooks are valid yaml when you are first getting used to ansible syntax.

Try this instead

`

---

<div class="post-metadata">

**Author:** ![Josh\_Smift2](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Josh\_Smift2](https://forum.ansible.com/u/Josh_Smift2)\
**Post date:** [January 16, 2018, 6:12pm UTC](https://forum.ansible.com/t/whats-wrong-with-this/26488/3 "2018-01-16T18:12:51Z")

</div>

[https://github.com/willthames/ansible-lint](https://github.com/willthames/ansible-lint) is also nice, and includes Ansible-specific best-practices suggestions as well.

---

<div class="post-metadata">

**Author:** ![Pranay\_Nanda](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@Pranay\_Nanda](https://forum.ansible.com/u/Pranay_Nanda)\
**Post date:** [January 17, 2018, 5:38am UTC](https://forum.ansible.com/t/whats-wrong-with-this/26488/4 "2018-01-17T05:38:25Z")

</div>

Thanks!

But this is what I was doing. I don’t know how this is any different.

[![](https://lh3.googleusercontent.com/-d4PdzHdvdWM/Wl7hPlGs3lI/AAAAAAAABYc/PWp5HBkFOqAc4Vys_2A08h-Sg_2ArjPlACLcBGAs/s320/2018-01-17%2B11_07_26-Best%2BYAML%2BValidator%2BOnline%2B.png)](https://lh3.googleusercontent.com/-d4PdzHdvdWM/Wl7hPlGs3lI/AAAAAAAABYc/PWp5HBkFOqAc4Vys_2A08h-Sg_2ArjPlACLcBGAs/s1600/2018-01-17%2B11_07_26-Best%2BYAML%2BValidator%2BOnline%2B.png)

---

<div class="post-metadata">

**Author:** ![Pranay\_Nanda](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@Pranay\_Nanda](https://forum.ansible.com/u/Pranay_Nanda)\
**Post date:** [January 17, 2018, 5:44am UTC](https://forum.ansible.com/t/whats-wrong-with-this/26488/5 "2018-01-17T05:44:09Z")

</div>

Got it! The two hyphens below the file module statement. Fixed it. Thanks again!
