Last active
March 21, 2019 17:40
-
-
Save bugcy013/c8c4ac81c5ea603b628fcf5c0a6ca24c to your computer and use it in GitHub Desktop.
Run Ansible Role
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
| --- | |
| # Runs an ansible role | |
| # Usage: | |
| # ansible-playbook ./run_role.yml -e "role=dv_sysctl target=localhost" | |
| # ansible-playbook ./run_role.yml -e "role=dv_inventory_update target=Hera" -i inventories/dv_inventry.py | |
| # ansible-playbook ./run_role.yml -e "role=dv_inventory_update target=all" -i inventories/dv_inventry.py -l 172.16.30.150 | |
| # | |
| - hosts: "{{ target }}" | |
| become: "{{ sudo }}" | |
| gather_facts: True | |
| remote_user: rdansible | |
| roles: | |
| - "{{ role }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment