Refactor ansible-apply.yaml to include playbook_login.yml

This commit is contained in:
2024-09-29 11:42:32 +02:00
parent 5324ef7ec0
commit a03aca39df
11 changed files with 68 additions and 52 deletions
+6 -2
View File
@@ -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