# ERROR! A malformed block was encountered while loading a block

**URL:** <https://forum.ansible.com/t/error-a-malformed-block-was-encountered-while-loading-a-block/29176>\
**Category:** Ansible Project\
**Created:** [December 3, 2018, 12:18pm UTC](https://forum.ansible.com/t/error-a-malformed-block-was-encountered-while-loading-a-block/29176 "2018-12-03T12:18:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VJ49](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@VJ49](https://forum.ansible.com/u/VJ49)\
**Post date:** [December 3, 2018, 12:18pm UTC](https://forum.ansible.com/t/error-a-malformed-block-was-encountered-while-loading-a-block/29176/1 "2018-12-03T12:18:06Z")

</div>

HI,  
I am familiar with this ansible coding. Right now, ansible updated to 2.7. While running/checking the syntax of a code. I am getting error as a malformed block was encountered while loading a block.  
I found that problem is with ansible keyword “roles”. In ansible 2.7, roles syntax changed partially. I am posting my code here. Can anyone help me to resolve this issue…

Code:

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [December 3, 2018, 12:22pm UTC](https://forum.ansible.com/t/error-a-malformed-block-was-encountered-while-loading-a-block/29176/2 "2018-12-03T12:22:19Z")

</div>

This basic playbook looks ok so can it be that the issue is in your role?

---

<div class="post-metadata">

**Author:** ![VJ49](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@VJ49](https://forum.ansible.com/u/VJ49)\
**Post date:** [December 3, 2018, 12:26pm UTC](https://forum.ansible.com/t/error-a-malformed-block-was-encountered-while-loading-a-block/29176/3 "2018-12-03T12:26:04Z")

</div>

@Dick Visser…yes… May be there is any issue with role syntax when compare to ansible 2.7 version
