On 05. juli 2016 16:34, Dave Cottlehuber wrote:
I couldn't find a working example or docs of nested playbooks. I only
see it mentioned here[1]:
"Playbooks can include other playbooks too, but that’s mentioned in
a later section."
This is what I currently have:
# site.yml
---
- name: site | deploy and configure all the things
hosts: all
become: yes
gather_facts: yes
vars_files:
- vars/users.yml
- vars/iocage.yml
tasks:
- include: base.yml
- include: dev.yml
- include: mgmt.yml
You have included base, dev and mgmt as task files, not as playbooks.
Just remove the spaces in front and they will be includes as playbooks.
- name: site | deploy and configure all the things
hosts: all
become: yes
gather_facts: yes
vars_files:
- vars/users.yml
- vars/iocage.yml
tasks:
- include: base.yml
- include: dev.yml
- include: mgmt.yml
Since you don't have any tasks in the site.yml playbook you can remove
tasks:
--
Kai Stian Olstad
--
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/577BCC72.1010507%40olstad.com.
For more options, visit https://groups.google.com/d/optout.