Ansible assumes that roles/x/tasks/main.yml is a plain list of tasks, but 
when the file is in the format:

tasks:
- xxx
...

it fails with unexpected exception (AssertionError):

File "/opt/ansible/ansible/lib/ansible/playbook/helpers.py", line 37, in 
load_list_of_blocks
    assert isinstance(ds, (list, type(None)))
AssertionError

When it expects ds to be an list, it is actually an dict with 'task' key.

It involves digging into the Ansible code to know that my main.yml is 
malformed. I would suggest Ansible point out the syntax, or accept both 
format of main.yml.

In either case, I would like to send a patch for review.

-- 
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 
https://groups.google.com/d/msgid/ansible-project/0f1fc49d-ba87-4c33-b1e9-5020b7e21f77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to