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 the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/27d12b29-6084-4954-b065-808abe74c81a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to