Created
September 1, 2016 21:04
-
-
Save freephile/25b8f5fc1ca413bc895d1734a6598cee to your computer and use it in GitHub Desktop.
include plays in ansible playbook
This file contains 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
--- | |
# You can't include plays in plays | |
# This will FAIL a syntax check / will not execute | |
- hosts: mw_hosts | |
name: Install sources, extensions and skins | |
tasks: | |
- name: Do Nothing At All | |
debug: msg="I'm a task" | |
- include: install_mediawiki.yml | |
- include: install_extensions.yml | |
- include: install_skins.yml | |
# instead, either call ansible-playbook install_wiki.yml install_mediawiki.yml install_extensions.yml ... | |
# OR, move the includes to the level of an independent play | |
# This WILL work | |
- hosts: mw_hosts | |
name: Install sources, extensions and skins | |
tasks: | |
- name: Do Nothing At All | |
debug: msg="I'm a task" | |
- include: install_mediawiki.yml | |
- include: install_extensions.yml | |
- include: install_skins.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment