Create secondary Infra directory and pull changes when using Infra command
This commit is contained in:
parent
b52f1d4486
commit
81cd3a1c1c
@ -16,6 +16,7 @@ wx-infra(){
|
||||
INFRA_PATH="~/.warengroup/infra"
|
||||
else
|
||||
INFRA_PATH="~/.warengroup/infra"
|
||||
mkdir -p "$INFRA_PATH" &> /dev/null
|
||||
git clone ssh://git@git.waren.io:2222/warengroup-private/infra.git --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy" "$INFRA_PATH"
|
||||
fi
|
||||
fi
|
||||
@ -31,11 +32,13 @@ wx-infra(){
|
||||
echo "Tag Required"
|
||||
else
|
||||
cd "$INFRA_PATH"
|
||||
git pull &> /dev/null
|
||||
ansible-playbook --vault-id warengroup@vault/warengroup --vault-id cwchristerw@vault/cwchristerw playbooks/init.yml -t $2 $3 $4 $5 $6 $7 $8 $9
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
else
|
||||
cd "$INFRA_PATH"
|
||||
git pull &> /dev/null
|
||||
ansible-playbook --vault-id warengroup@vault/warengroup --vault-id cwchristerw@vault/cwchristerw playbooks.yml -t $1 $2 $3 $4 $5 $6 $7 $8 $9
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
|
3
wx
3
wx
@ -149,6 +149,7 @@ wx-infra(){
|
||||
INFRA_PATH="~/.warengroup/infra"
|
||||
else
|
||||
INFRA_PATH="~/.warengroup/infra"
|
||||
mkdir -p "$INFRA_PATH" &> /dev/null
|
||||
git clone ssh://git@git.waren.io:2222/warengroup-private/infra.git --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy" "$INFRA_PATH"
|
||||
fi
|
||||
fi
|
||||
@ -164,11 +165,13 @@ wx-infra(){
|
||||
echo "Tag Required"
|
||||
else
|
||||
cd "$INFRA_PATH"
|
||||
git pull &> /dev/null
|
||||
ansible-playbook --vault-id warengroup@vault/warengroup --vault-id cwchristerw@vault/cwchristerw playbooks/init.yml -t $2 $3 $4 $5 $6 $7 $8 $9
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
else
|
||||
cd "$INFRA_PATH"
|
||||
git pull &> /dev/null
|
||||
ansible-playbook --vault-id warengroup@vault/warengroup --vault-id cwchristerw@vault/cwchristerw playbooks.yml -t $1 $2 $3 $4 $5 $6 $7 $8 $9
|
||||
cd "$OLDPWD"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user