diff options
Diffstat (limited to 'apply-role.sh')
-rwxr-xr-x | apply-role.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apply-role.sh b/apply-role.sh index 5af348d4..708a8357 100755 --- a/apply-role.sh +++ b/apply-role.sh @@ -9,11 +9,10 @@ shift role="$1" shift -source "${BASH_SOURCE%/*}/common/utils.sh" -get_ansible_variable env_group "$hosts" -if [ $? -ne 0 ]; then - exit 1 -fi +cd "${BASH_SOURCE%/*}" +source common/utils.sh +ansible_variable__get env_group "$hosts" || exit 1 +vault_environment__set "$env_group" || exit 1 echo "######## applying the role '$role' to host(s) '$hosts' in environment '$env_group' ########" exec ansible-playbook -e "myhosts=$hosts" -e "myrole=$role" $@ "$env_group/generic.yaml" |