i have following simple YAML play file

 - name: Execute the command in remote shell; stdout goes to the specified file 
on the remote.
   shell: echo hi

but when running ansible-playbook command: getting following error

ERROR! The tasks/main.yml file for role 'xyz' must contain a list of tasks

The error appears to have been in 
'/home/cdkubemaster1/plabook_structure/roles/xyz/tasks/main.yml': line 2, 
column 1, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

^ here

exception type: <type 'exceptions.AssertionError'>
exception: {u'tasks': [{u'shell': u'echo hi', u'name': u'Execute the 
command in remote shell; stdout goes to the specified file on the 
remote.'}]} should be a list or None but is <class 

what is expected:
All the tasks mentioned in the playbook should be executed ...
i have here just one tasks , but the error says , need to have all the list 
of tasks ..
Not getting what is mean to that ?
please suggest


You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to