Created
September 5, 2018 18:00
-
-
Save michaelgugino/4df124b2f03f4086809d8948c844e8cf to your computer and use it in GitHub Desktop.
How to use variable group_names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # prerequisites.yml | |
| - hosts: "{{ new_hosts | default('apache_hosts') }}" | |
| tasks: | |
| - do_something | |
| # playbook1.yml | |
| - hosts: "{{ current_apache_hosts | default('apache_hosts') }}" | |
| tasks: | |
| - do_something | |
| # site.yml | |
| - import_playbook: prerequisites.yml | |
| - import_playbook: playbook1.yml | |
| # add_hosts.yml | |
| - import_playbook: prerequisites.yml | |
| vars: | |
| new_hosts: "new_apache_hosts" | |
| - import_playbook: playbook1.yml | |
| vars: | |
| current_apache_hosts: "new_apache_hosts" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment