# ERROR! 'expect' is not a valid attribute for a Play

**URL:** <https://forum.ansible.com/t/error-expect-is-not-a-valid-attribute-for-a-play/20745>\
**Category:** Ansible Project\
**Created:** [March 2, 2016, 4:30am UTC](https://forum.ansible.com/t/error-expect-is-not-a-valid-attribute-for-a-play/20745 "2016-03-02T04:30:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nor\_Idzuwan\_Mohammad](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@Nor\_Idzuwan\_Mohammad](https://forum.ansible.com/u/Nor_Idzuwan_Mohammad)\
**Post date:** [March 2, 2016, 4:30am UTC](https://forum.ansible.com/t/error-expect-is-not-a-valid-attribute-for-a-play/20745/1 "2016-03-02T04:30:14Z")

</div>

I’m trying to use the expect modules but only getting error

> ansible-playbook -vv --syntax-check passwd.yml

ERROR! ‘expect’ is not a valid attribute for a Play

The error appears to have been in ‘/home/users/.local/ansible/playbooks/passwd.yml’: line 2, column 3, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 2, 2016, 1:48pm UTC](https://forum.ansible.com/t/error-expect-is-not-a-valid-attribute-for-a-play/20745/2 "2016-03-02T13:48:01Z")

</div>

expect needs to be correctly indented (line up with the ‘n’ in name) also you want to make sure the command and rest of parameters are also indented farther than the ‘e’ in expect.
