Last active
August 29, 2015 14:23
-
-
Save mikerowehl/b4d0a1408f1e0d449e9f to your computer and use it in GitHub Desktop.
Negative pattern in ansible
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
- hosts: tag_clusterType_* | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: Get everything in a cluster | |
debug: var=hostvars[inventory_hostname]['ec2_tag_Name'] | |
- hosts: all:!tag_clusterType_* | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: Everything else | |
debug: var=hostvars[inventory_hostname]['ec2_tag_Name'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment