[root@install-test7 ansible]# ansible-playbook roles/dns/tasks/main.yml -vvvUsing /etc/ansible/ansible.cfg as config file1 plays in roles/dns/tasks/main.yml
PLAY ***************************************************************************
TASK [setup] *******************************************************************...ok: [www-test7]
TASK [include] *****************************************************************task path: /etc/ansible/roles/dns/tasks/main.yml:4fatal: [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
[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
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
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.
[root@install-test7 ~]# cat /etc/ansible/roles/dns/tasks/ensure_resolv_conf.yml---- hosts: all tasks:
- name: ensure resolve.conf contents copy: src=resolv.conf dest=/etc/resolv.conf owner=root group=root mode=0644
main.yaml
- include:auxiliary_playbook.yml
vars:
host_ip: {some_vm.ip}
auxiliary_playbook.yml
hosts: {{host_ip}}
Error:
fatal: [localhost]: FAILED! => {"failed": true, "reason": "Syntax Error while loading YAML.\n\n\nThe error appears to have been in '/path_to/auxiliary_playbook.yml': line 1, column 11, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hosts: {{host_ip}}\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
main.yaml
- include:auxiliary_playbook.yml
auxiliary_playbook.yml
hosts: tag_Name_my_vm
Error:
fatal: [localhost]: FAILED! => {"failed": true, "reason": "no action detected in task. This often indicates a misspelled module name, or incorrect module path.\n\nThe error appears to have been in '/path_to/auxiliary_playbook.yml': line 1, 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:\n ^ here\n"}
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/62de02fa-0508-44f5-a78d-7e0b82df5836%40googlegroups.com.
- name: Invoking administrator playbook.
include: administrator.yml- hosts: myHost
roles:
- { role: my_modules }
tasks:
- name: "Gather facts."--
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+unsubscribe@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.