# ERROR! A malformed role declaration was encountere

**URL:** <https://forum.ansible.com/t/error-a-malformed-role-declaration-was-encountere/28536>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [September 10, 2018, 10:10am UTC](https://forum.ansible.com/t/error-a-malformed-role-declaration-was-encountere/28536 "2018-09-10T10:10:10Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [September 10, 2018, 10:10am UTC](https://forum.ansible.com/t/error-a-malformed-role-declaration-was-encountere/28536/1 "2018-09-10T10:10:10Z")

</div>

'roles' should be a list:

- hosts: web-core  
&nbsp;&nbsp;roles:  
&nbsp;&nbsp;&nbsp;&nbsp;- telegrafw

Dick

---

<div class="post-metadata">

**Author:** ![rajendra.rawat17](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rajendra.rawat17](https://forum.ansible.com/u/rajendra.rawat17)\
**Post date:** [November 15, 2018, 11:51am UTC](https://forum.ansible.com/t/error-a-malformed-role-declaration-was-encountere/28536/2 "2018-11-15T11:51:24Z")

</div>

It worked for me. thanks.
