From 570d533df3595f20a7dbe6f734940cbd2b19c840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sat, 29 Jun 2024 20:21:16 +0300 Subject: [PATCH] Code Update --- init.sh | 4 ++-- src/functions/init.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index 08f1c66..688a01e 100755 --- a/init.sh +++ b/init.sh @@ -77,7 +77,7 @@ wi-init(){ curl \ -H "X-Vault-Token: ${config["login",$ORG]}" \ -X GET \ - https://$VAULT_DOMAIN/v1/init.sh/data/ssh -s | jq -r '.data.data.privkey' > ~/.ssh/init + https://$VAULT_DOMAIN/v1/init.sh/data/ssh -s | jq -r '.data.data.privkey' > ~/.ssh/keys/init chmod 700 ~/.ssh/keys/init &> /dev/null @@ -109,7 +109,7 @@ wi-init(){ /opt/ansible/bin/ansible-galaxy collection install ansible.posix ansible.utils community.crypto community.docker community.general community.hashi_vault community.libvirt community.mysql community.postgresql containers.podman --upgrade &> /dev/null - /opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --accept-host-key --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/init playbooks/init.yml -t init + /opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --accept-host-key --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/keys/init playbooks/init.yml -t init unset HVT } diff --git a/src/functions/init.sh b/src/functions/init.sh index db84a97..9df4e4a 100644 --- a/src/functions/init.sh +++ b/src/functions/init.sh @@ -11,7 +11,7 @@ wi-init(){ curl \ -H "X-Vault-Token: ${config["login",$ORG]}" \ -X GET \ - https://$VAULT_DOMAIN/v1/init.sh/data/ssh -s | jq -r '.data.data.privkey' > ~/.ssh/init + https://$VAULT_DOMAIN/v1/init.sh/data/ssh -s | jq -r '.data.data.privkey' > ~/.ssh/keys/init chmod 700 ~/.ssh/keys/init &> /dev/null @@ -43,7 +43,7 @@ wi-init(){ /opt/ansible/bin/ansible-galaxy collection install ansible.posix ansible.utils community.crypto community.docker community.general community.hashi_vault community.libvirt community.mysql community.postgresql containers.podman --upgrade &> /dev/null - /opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --accept-host-key --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/init playbooks/init.yml -t init + /opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --accept-host-key --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/keys/init playbooks/init.yml -t init unset HVT }