Get Ansible vault passwords in Infra command
This commit is contained in:
parent
714feda225
commit
d1a76d1b81
@ -21,6 +21,19 @@ wx-infra(){
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f "$INFRA_PATH/vault/cwchristerw" || ! -f "$INFRA_PATH/vault/warengroup" ]]
|
||||
then
|
||||
curl \
|
||||
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
||||
-X GET \
|
||||
https://$VAULT_DOMAIN/v1/cli/data/cwchristerw/settings/infra -s | jq -r '.data.data.cwchristerw' > "$INFRA_PATH/vault/cwchristerw"
|
||||
|
||||
curl \
|
||||
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
||||
-X GET \
|
||||
https://$VAULT_DOMAIN/v1/cli/data/cwchristerw/settings/infra -s | jq -r '.data.data.warenroup' > "$INFRA_PATH/vault/warengroup"
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]]
|
||||
then
|
||||
echo "Tag Required"
|
||||
|
13
wx
13
wx
@ -154,6 +154,19 @@ wx-infra(){
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f "$INFRA_PATH/vault/cwchristerw" || ! -f "$INFRA_PATH/vault/warengroup" ]]
|
||||
then
|
||||
curl \
|
||||
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
||||
-X GET \
|
||||
https://$VAULT_DOMAIN/v1/cli/data/cwchristerw/settings/infra -s | jq -r '.data.data.cwchristerw' > "$INFRA_PATH/vault/cwchristerw"
|
||||
|
||||
curl \
|
||||
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
||||
-X GET \
|
||||
https://$VAULT_DOMAIN/v1/cli/data/cwchristerw/settings/infra -s | jq -r '.data.data.warenroup' > "$INFRA_PATH/vault/warengroup"
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]]
|
||||
then
|
||||
echo "Tag Required"
|
||||
|
Loading…
Reference in New Issue
Block a user