diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index c33adf7..0453fe0 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -2,7 +2,7 @@ name: CD on: push: - branches: [master] + branches: [master, bug/cd-fixes] workflow_dispatch: jobs: @@ -37,10 +37,20 @@ jobs: # Ensure that servers we're deploying to are known. Otherwise, # Ansible may fail with host key verification error. mkdir -p ~/.ssh && echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts + cat < ~/.ssh/config + Host _jumphost + User bunny + HostName hoth.kalnytskyi.com + IdentityFile ${{ steps.ssh-key.outputs.uri }} + + Host xsnippet.org + HostName 2a02:8084:4:e480:244a:d5a5:ac59:617d + ProxyJump _jumphost + IdentityFile ${{ steps.ssh-key.outputs.uri }} + EOF ansible-playbook \ -vv \ - -e ansible_ssh_private_key_file="${{ steps.ssh-key.outputs.uri }}" \ -e goaccess_basicauth_password="${{ secrets.GOACCESS_PASSWORD }}" \ --inventory inventories/production \ site.yml diff --git a/inventories/production/hosts b/inventories/production/hosts index 10f041e..7832f69 100644 --- a/inventories/production/hosts +++ b/inventories/production/hosts @@ -1,6 +1,5 @@ [xsnippet] -2a02:8084:4:e480:244a:d5a5:ac59:617d +xsnippet.org [xsnippet:vars] ansible_user = provisioner -ansible_ssh_common_args = -J bunny@hoth.kalnytskyi.com