Created
March 23, 2013 04:28
-
-
Save zbal/5226450 to your computer and use it in GitHub Desktop.
netsted with_items
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
main playbook: | |
tasks: | |
- include: $item/tasks/main.yml | |
when_string: "'$item' in $group_names" | |
with_items: | |
- apache | |
- php | |
included file ex. apache/tasks/main.yml: | |
name: install packages | |
apt: pkg=$item state=present | |
with_items: | |
- apache2 | |
- some other packages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment