Change hostname to host parameter in Infra command
This commit is contained in:
@@ -54,7 +54,7 @@ wx-infra(){
|
||||
then
|
||||
wxi-header "Init" h3
|
||||
|
||||
hostname=${args['hostname']}
|
||||
host=${args['host']}
|
||||
|
||||
if [[ -z ${args['3']} ]]
|
||||
then
|
||||
@@ -63,24 +63,24 @@ wx-infra(){
|
||||
tags=${args['3']}
|
||||
fi
|
||||
|
||||
ansible-playbook $INFRA_VAULT init.yml --tags $tags --limit "$hostname"
|
||||
ansible-playbook $INFRA_VAULT init.yml --tags $tags --limit "$host"
|
||||
elif [[ ${args['2']} == "manager" ]]
|
||||
then
|
||||
if [[ -z ${args['hostname']} ]]
|
||||
if [[ -z ${args['host']} ]]
|
||||
then
|
||||
hostname="any"
|
||||
host="any"
|
||||
else
|
||||
hostname=${args['hostname']}
|
||||
host=${args['host']}
|
||||
fi
|
||||
operation=${args['operation']}
|
||||
|
||||
wxi-header "Manager" h3
|
||||
ansible-playbook $INFRA_VAULT manager.yml --tags $operation --extra-vars "host=$hostname operation=$operation"
|
||||
ansible-playbook $INFRA_VAULT manager.yml --tags $operation --extra-vars "host=$host operation=$operation"
|
||||
else
|
||||
wxi-header "Infra" h3
|
||||
hostname=${args['hostname']}
|
||||
host=${args['host']}
|
||||
tags=${args['2']}
|
||||
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$hostname"
|
||||
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$host"
|
||||
fi
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
|
||||
16
wx
16
wx
@@ -326,7 +326,7 @@ wx-infra(){
|
||||
then
|
||||
wxi-header "Init" h3
|
||||
|
||||
hostname=${args['hostname']}
|
||||
host=${args['host']}
|
||||
|
||||
if [[ -z ${args['3']} ]]
|
||||
then
|
||||
@@ -335,24 +335,24 @@ wx-infra(){
|
||||
tags=${args['3']}
|
||||
fi
|
||||
|
||||
ansible-playbook $INFRA_VAULT init.yml --tags $tags --limit "$hostname"
|
||||
ansible-playbook $INFRA_VAULT init.yml --tags $tags --limit "$host"
|
||||
elif [[ ${args['2']} == "manager" ]]
|
||||
then
|
||||
if [[ -z ${args['hostname']} ]]
|
||||
if [[ -z ${args['host']} ]]
|
||||
then
|
||||
hostname="any"
|
||||
host="any"
|
||||
else
|
||||
hostname=${args['hostname']}
|
||||
host=${args['host']}
|
||||
fi
|
||||
operation=${args['operation']}
|
||||
|
||||
wxi-header "Manager" h3
|
||||
ansible-playbook $INFRA_VAULT manager.yml --tags $operation --extra-vars "host=$hostname operation=$operation"
|
||||
ansible-playbook $INFRA_VAULT manager.yml --tags $operation --extra-vars "host=$host operation=$operation"
|
||||
else
|
||||
wxi-header "Infra" h3
|
||||
hostname=${args['hostname']}
|
||||
host=${args['host']}
|
||||
tags=${args['2']}
|
||||
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$hostname"
|
||||
ansible-playbook $INFRA_VAULT infra.yml --tags $tags --limit "$host"
|
||||
fi
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user