Created
January 29, 2016 17:07
-
-
Save paul-english/e473d3e33fdb8ef271d1 to your computer and use it in GitHub Desktop.
ansible-playbook
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
| #!/usr/bin/env bash | |
| # Place this script in a directory that preceeds the location of | |
| # the real ansible-playbook script in your PATH. When run, it | |
| # will add passwords found in the .ansible-vars file, then call | |
| # the real ansible-playbook script. | |
| set -e | |
| #set -x | |
| function detect_check_and_load () { | |
| [ -f "$1" ] || return 0 | |
| chmod 0600 "$1" | |
| . "$1" | |
| } | |
| detect_check_and_load "$HOME/.ansible-vars" | |
| detect_check_and_load "./.ansible-vars" | |
| exec "$ANSIBLE_HOME/bin/ansible-playbook" $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment