Created
September 5, 2018 18:04
-
-
Save michaelgugino/56801b562553b275102c478d09c08726 to your computer and use it in GitHub Desktop.
Groups and such.
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
| #inventory.txt | |
| [apache_hosts] | |
| node1 | |
| node2 | |
| [new_group] | |
| node2 | |
| # playbook1.yml | |
| - hosts: apache_hosts | |
| tasks: | |
| - do_something | |
| # cli | |
| ansible-playbook -i inventory.txt playbook1.yml -l new_group | |
| # Results: | |
| # do_something runs against only node2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment