Skip to content

Commit

Permalink
Rename deploy workflows ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit committed Sep 28, 2024
1 parent f83b3b4 commit aa7f57c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ansible-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
- name: Install ssh keys
# For reference: https://stackoverflow.com/a/70447517
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
install -m 600 -D /dev/null ~/.ssh/galaxy
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/galaxy
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
- name: Run Ansible Playbook
run: |
cd ansible
ansible-playbook -i hosts dev.yml --key-file ~/.ssh/id_rsa
ansible-playbook -i hosts dev.yml
env:
ANSIBLE_HOST_KEY_CHECKING: 'False'
ANSIBLE_REMOTE_USER: ${{ secrets.SSH_USER }}
ANSIBLE_PRIVATE_KEY_FILE: ~/.ssh/id_rsa
ANSIBLE_PRIVATE_KEY_FILE: ~/.ssh/galaxy
8 changes: 4 additions & 4 deletions .github/workflows/ansible-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
- name: Install ssh keys
# For reference: https://stackoverflow.com/a/70447517
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
install -m 600 -D /dev/null ~/.ssh/galaxy
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/galaxy
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
- name: Run Ansible Playbook
run: |
cd ansible
ansible-playbook -i hosts prod.yml --key-file ~/.ssh/id_rsa
ansible-playbook -i hosts prod.yml
env:
ANSIBLE_HOST_KEY_CHECKING: 'False'
ANSIBLE_REMOTE_USER: ${{ secrets.SSH_USER }}
ANSIBLE_PRIVATE_KEY_FILE: ~/.ssh/id_rsa
ANSIBLE_PRIVATE_KEY_FILE: ~/.ssh/galaxy

0 comments on commit aa7f57c

Please sign in to comment.