Hi Saurabh, I was told that this is not a bug, but a feature of Ansible 2.x
I ended up rewriting the whole thing. Sorry I couldn't help more. Best regards, Dan Daniel Osielczak PGP Key: 4096R/3EC320D0 Fingerprint: 4268 54CD 50FF 5465 DFC3 EA59 4350 D3BC 3EC3 20D0 2016-08-09 10:37 GMT+01:00 Saurabh Joshi <joshisaurabh2...@gmail.com>: > Hi Daniel, > > Did you come across any solution to this issue? > I am stuck with same situation where I have an > - name: Invoking administrator playbook. > include: administrator.yml > > and administrator.yml has > - hosts: myHost > roles: > - { role: my_modules } > tasks: > - name: "Gather facts." > Using ansible 2.1.0.0. > > Please share the workaround in case you have got one. > > Thanks, > Saurabh. > > > On Friday, 11 March 2016 22:08:05 UTC+5:30, Daniel Osielczak wrote: >> >> Hi, >> >> I'm setting up an Ansible 2 environemnt and stumbled upon a problem: >> >> when I run main.yml (either as a separate playbook or using the main >> site.yml) I get an error "ERROR! no action detected in task": >> >> [root@install-test7 ansible]# ansible-playbook roles/dns/tasks/main.yml >> -vvv >> Using /etc/ansible/ansible.cfg as config file >> 1 plays in roles/dns/tasks/main.yml >> >> PLAY ************************************************************ >> *************** >> >> TASK [setup] ************************************************************ >> ******* >> ... >> ok: [www-test7] >> >> TASK [include] ****************************** >> *********************************** >> task path: /etc/ansible/roles/dns/tasks/main.yml:4 >> fatal: [www-test7]: FAILED! => {"failed": true, "reason": "ERROR! no >> action detected in task\n\nThe error appears to have been in >> '/etc/ansible/roles/dns/tasks/ensure_resolv_conf.yml': line 2, column 3, >> but may\nbe elsewhere in the file depending on the exact syntax >> problem.\n\nThe offending line appears to be:\n\n---\n- hosts: all\n ^ >> here\n"} >> >> PLAY RECAP ************************************************************ >> ********* >> www-test7 : ok=1 changed=0 unreachable=0 >> failed=1 >> >> >> The playbook is pretty simple (have already tried different ways to write >> it, fail everytime): >> >> [root@install-test7 ansible]# cat roles/dns/tasks/main.yml >> --- >> - hosts: all >> tasks: >> - include: ensure_resolv_conf.yml tags=resolv_conf >> - include: ensure_hosts.yml tags=etc_hosts >> >> >> The interesting part is, all of the playbooks included work perfectly >> when run individually. >> >> Is there something I'm missing in the documentation or is Ansible 2 >> acctually still unstable at the moment? >> >> Best regards, >> Daniel >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/ansible-project/BjycVAVlUpI/unsubscribe. > To unsubscribe from this group and all its topics, 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/bcfcd28e-3fa4-4355-a666-4bb263944d4c%40googlegroups. > com > <https://groups.google.com/d/msgid/ansible-project/bcfcd28e-3fa4-4355-a666-4bb263944d4c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BCmEQ4fA-%3Drq_SODUs_V2KajnZk%2Bt6VJRLbCQh2hAkCt12LNA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.