Refactor ansible-apply.yaml to include playbook_login.yml
This commit is contained in:
+6
-2
@@ -16,6 +16,11 @@ function help {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z $ANSIBLE_USER ]; then
|
||||
echo "ANSIBLE_USER environment variable not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# parse arguments
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
@@ -47,5 +52,4 @@ else
|
||||
fi
|
||||
|
||||
# execute ansible-playbook
|
||||
sectool exec ansible-playbook -i inventory/hosts $DRY_RUN $PLAYBOOK
|
||||
|
||||
sectool exec ansible-playbook -u $ANSIBLE_USER $DRY_RUN $PLAYBOOK
|
||||
|
||||
Reference in New Issue
Block a user