diff --git a/src/commands/infra.sh b/src/commands/infra.sh index 0ad7097..80cf96e 100644 --- a/src/commands/infra.sh +++ b/src/commands/infra.sh @@ -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 diff --git a/wx b/wx index ce83229..b61dfdb 100755 --- a/wx +++ b/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