# expected \<block end\>, but found '-'

**URL:** <https://forum.ansible.com/t/expected-block-end-but-found/25568>\
**Category:** Ansible Project\
**Created:** [September 21, 2017, 8:03pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568 "2017-09-21T20:03:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [September 21, 2017, 8:03pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568/1 "2017-09-21T20:03:34Z")

</div>

I’m following this post, [https://www.ibm.com/developerworks/cloud/library/cl-provision-docker-containers-ansible/index.html](https://www.ibm.com/developerworks/cloud/library/cl-provision-docker-containers-ansible/index.html), and Listing 11

`

---

<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:** [September 21, 2017, 8:10pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568/2 "2017-09-21T20:10:36Z")

</div>

You seem to be missing `tasks:` in your first play. As such YAML wasn’t expecting you to start a list there.

---

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [September 21, 2017, 8:41pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568/3 "2017-09-21T20:41:30Z")

</div>

So the original authors Listing 11 is wrong?

---

<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:** [September 21, 2017, 8:43pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568/4 "2017-09-21T20:43:25Z")

</div>

I didn’t go look at the authors page. Based on what you provided, the first play is missing `tasks:`

---

<div class="post-metadata">

**Author:** ![thomas\_okonkwo](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@thomas\_okonkwo](https://forum.ansible.com/u/thomas_okonkwo)\
**Post date:** [May 21, 2020, 10:36pm UTC](https://forum.ansible.com/t/expected-block-end-but-found/25568/5 "2020-05-21T22:36:02Z")

</div>

# I ran into this error earlier today and i found the easiest way to fix problems like these and other indentation problem in yaml config file.#

# check out [www.yamllint.com](http://www.yamllint.com)#

# **How it works** # Open the URL and copy your yaml configuration file into the blank page and paste (of course, you can tweak your sensitive information so you don’t leak them). What this does is, fix the indentations issues and point out the exact location and by how much space you need to adjust.#

# To read more indepth documentations about Yaml Lint, click [yamllint documentation — yamllint 1.37.1 documentation](https://yamllint.readthedocs.io/en/stable)
