CLI: Update

This commit is contained in:
Christer Waren committed 2026-10-17 07:32:28 +03:00
1 parent ef170c29a1
commit 9b8eefd6df
1 file changed
+8 -8
+8 -8
View File
@@ -497,7 +497,7 @@ wx-infra(){
then then
wxi-header "Init" h3 wxi-header "Init" h3
host=${args['host']} limit=${args['limit']}
if [[ -z ${args['3']} ]] if [[ -z ${args['3']} ]]
then then
@@ -506,26 +506,26 @@ wx-infra(){
tags=${args['3']} tags=${args['3']}
fi fi
ansible-playbook $INFRA_VAULT init.yml --tags $tags --limit "$host" ansible-playbook $INFRA_VAULT init.yml --tags $tags --limit "$limit"
elif [[ ${args['2']} == "manager" ]] elif [[ ${args['2']} == "manager" ]]
then then
if [[ -z ${args['host']} ]] if [[ -z ${args['limit']} ]]
then then
host="*" limit="*"
else else
host=${args['host']} limit=${args['limit']}
fi fi
operation=${args['operation']} operation=${args['operation']}
extra_vars=${args['extra-vars']} extra_vars=${args['extra-vars']}
wxi-header "Manager" h3 wxi-header "Manager" h3
ansible-playbook $INFRA_VAULT manager.yml --tags $operation --extra-vars "host=$host" --extra-vars="$extra_vars" ansible-playbook $INFRA_VAULT manager.yml --tags $operation --extra-vars "host=$limit" --extra-vars="$extra_vars"
else else
wxi-header "Infra" h3 wxi-header "Infra" h3
host=${args['host']} limit=${args['limit']}
tags=${args['2']} tags=${args['2']}
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$host" ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$limit"
fi fi
cd "$OLDPWD" cd "$OLDPWD"
fi fi