From b58142a45f45d8c9999d0a81f1823d8f0f6d86d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 3 May 2024 00:53:02 +0300 Subject: [PATCH] Code Update --- src/commands/infra.sh | 23 +++++++++++++++++++++++ wx | 24 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/commands/infra.sh diff --git a/src/commands/infra.sh b/src/commands/infra.sh new file mode 100644 index 0000000..63d255c --- /dev/null +++ b/src/commands/infra.sh @@ -0,0 +1,23 @@ +wx-infra(){ + wx-login + wx-ssh-sign &> /dev/null + + echo " >> Infra << " + echo "------------------------------" + + case $USER in + cwchristerw) + if [[ -z $1 ]] + then + echo "Tag Required" + else + cd "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" + ansible-playbook --vault-id warengroup@vault/warengroup playbooks.yml -t $1 + cd "$OLDPWD" + fi + ;; + *) + echo "User Unsupported" + ;; + esac +} diff --git a/wx b/wx index 52e2ddd..eada757 100755 --- a/wx +++ b/wx @@ -242,6 +242,30 @@ Management Commands: } +wx-infra(){ + wx-login + wx-ssh-sign &> /dev/null + + echo " >> Infra << " + echo "------------------------------" + + case $USER in + cwchristerw) + if [[ -z $1 ]] + then + echo "Tag Required" + else + cd "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" + ansible-playbook --vault-id warengroup@vault/warengroup playbooks.yml -t $1 + cd "$OLDPWD" + fi + ;; + *) + echo "User Unsupported" + ;; + esac +} + wx-settings(){ wx-login