# Ansible shows error that says missing ':' even when it is already present

**URL:** <https://forum.ansible.com/t/ansible-shows-error-that-says-missing-even-when-it-is-already-present/34865>\
**Category:** Ansible Project\
**Created:** [March 26, 2021, 1:13pm UTC](https://forum.ansible.com/t/ansible-shows-error-that-says-missing-even-when-it-is-already-present/34865 "2021-03-26T13:13:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_S](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@Vikram\_S](https://forum.ansible.com/u/Vikram_S)\
**Post date:** [March 26, 2021, 1:13pm UTC](https://forum.ansible.com/t/ansible-shows-error-that-says-missing-even-when-it-is-already-present/34865/1 "2021-03-26T13:13:31Z")

</div>

Please look at the screenshot in below link. Ansible shows an error that ‘could not find expected :’. However as shown in the screenshot, the palce where it indicates an error, that palce already has the ‘:’. Why does ansible show this?

[https://drive.google.com/file/d/12JaxoVzORLBu21WrIhFSa-tndumTkX79/view?usp=sharing](https://drive.google.com/file/d/12JaxoVzORLBu21WrIhFSa-tndumTkX79/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Lars\_Liedtke](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Lars\_Liedtke](https://forum.ansible.com/u/Lars_Liedtke)\
**Post date:** [March 26, 2021, 1:17pm UTC](https://forum.ansible.com/t/ansible-shows-error-that-says-missing-even-when-it-is-already-present/34865/2 "2021-03-26T13:17:30Z")

</div>

I cannot tell for sure without seeing the code of this task, but could it perhaps be, that you forgot a “-” at the before “register”?

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [March 29, 2021, 4:54am UTC](https://forum.ansible.com/t/ansible-shows-error-that-says-missing-even-when-it-is-already-present/34865/3 "2021-03-29T04:54:11Z")

</div>

Hi Vikram,

Please include the full playbook.

---

<div class="post-metadata">

**Author:** ![Vikram\_S](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@Vikram\_S](https://forum.ansible.com/u/Vikram_S)\
**Post date:** [March 29, 2021, 8:16am UTC](https://forum.ansible.com/t/ansible-shows-error-that-says-missing-even-when-it-is-already-present/34865/4 "2021-03-29T08:16:23Z")

</div>

Hi,

‘-’ shouldn’t be used for register module. I later found that there was an empty space after the line which was causing the error.
