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

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:

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.