Refactor ansible-apply.yaml to configure SSH and disable host key checking
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user