Last active
April 12, 2017 13:22
-
-
Save gkspranger/00ccec68a5e3084ea3ab6304d2699c21 to your computer and use it in GitHub Desktop.
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
--- | |
# just a simple example of me using my bootstrap.yml file and re-using an action role | |
# this is nice because: 1) i can put my roles where i want to, and 2) it allows me to be as DRY as i want to be | |
- hosts: localhost | |
connection: local | |
gather_facts: False | |
become: False | |
vars_files: | |
# again, this defines my roles_dir and playbooks_dir | |
- "{{ inventory_dir }}/vars/bootstrap.yml" | |
- "{{ inventory_dir }}/vars/vault.yml" | |
roles: | |
# yay !! a re-usable action role, i just pass it a var | |
- role: "{{ roles_dir }}/action/nagios_silence_unsilence" | |
nagios_action: silence | |
# where the meat happens | |
- role: "{{ roles_dir }}/action/restart_awhsumapp" | |
# re-using that action role again | |
- role: "{{ roles_dir }}/action/nagios_silence_unsilence" | |
nagios_action: unsilence | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment