Refactor ansible-apply.yaml to configure SSH and disable host key checking

This commit is contained in:
2024-09-24 16:56:41 +02:00
parent 35274e8020
commit b14cfdbc3f
+7 -1
View File
@@ -34,11 +34,17 @@ jobs:
cp ssh-keys/ansible/id_rsa ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Configure SSH to Disable Host Key Checking
run: |
mkdir -p ~/.ssh
touch ~/.ssh/config
echo -e "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile=/dev/null\n" >> ~/.ssh/config
chmod 600 ~/.ssh/config
- name: Apply Ansible Playbook
env:
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
ANSIBLE_HOST_KEY_CHECKING: False
run: |
cd ansible
sectool exec ansible-playbook -i inventory/hosts playbook_microk8s.yml