Compare commits
2 Commits
7517d2d7c9
...
570d533df3
Author | SHA1 | Date | |
---|---|---|---|
|
570d533df3 | ||
|
cf58a86458 |
4
init.sh
4
init.sh
@ -77,7 +77,7 @@ wi-init(){
|
|||||||
curl \
|
curl \
|
||||||
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
||||||
-X GET \
|
-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
|
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-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
|
unset HVT
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ case $1 in
|
|||||||
echo "Updating..."
|
echo "Updating..."
|
||||||
cp ../wx/src/functions/header.sh src/functions/header.sh
|
cp ../wx/src/functions/header.sh src/functions/header.sh
|
||||||
cp ../wx/src/functions/repeat.sh src/functions/repeat.sh
|
cp ../wx/src/functions/repeat.sh src/functions/repeat.sh
|
||||||
cp ../wx/src/commands/login.sh src/functions/login.sh
|
cp ../wx/src/commands/auth/login.sh src/functions/login.sh
|
||||||
;;
|
;;
|
||||||
ready)
|
ready)
|
||||||
echo "Ready"
|
echo "Ready"
|
||||||
|
@ -11,7 +11,7 @@ wi-init(){
|
|||||||
curl \
|
curl \
|
||||||
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
-H "X-Vault-Token: ${config["login",$ORG]}" \
|
||||||
-X GET \
|
-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
|
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-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
|
unset HVT
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user