From c479044caf5e9560e95bfcf1596670432ba3c1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 6 Jan 2026 07:46:25 +0200 Subject: [PATCH] Change hostname to host parameter in Infra command --- src/commands/infra.sh | 16 ++++++++-------- wx | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) 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