CLI: Update
This commit is contained in:
1 parent
ef170c29a1
commit
9b8eefd6df
1 file changed
+8
-8
@@ -497,7 +497,7 @@ wx-infra(){
|
||||
then
|
||||
wxi-header "Init" h3
|
||||
|
||||
host=${args['host']}
|
||||
limit=${args['limit']}
|
||||
|
||||
if [[ -z ${args['3']} ]]
|
||||
then
|
||||
@@ -506,26 +506,26 @@ wx-infra(){
|
||||
tags=${args['3']}
|
||||
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" ]]
|
||||
then
|
||||
if [[ -z ${args['host']} ]]
|
||||
if [[ -z ${args['limit']} ]]
|
||||
then
|
||||
host="*"
|
||||
limit="*"
|
||||
else
|
||||
host=${args['host']}
|
||||
limit=${args['limit']}
|
||||
fi
|
||||
|
||||
operation=${args['operation']}
|
||||
extra_vars=${args['extra-vars']}
|
||||
|
||||
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
|
||||
wxi-header "Infra" h3
|
||||
host=${args['host']}
|
||||
limit=${args['limit']}
|
||||
tags=${args['2']}
|
||||
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$host"
|
||||
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$limit"
|
||||
fi
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user