Skip to content

Commit 0e1a461

Browse files
authored
Merge pull request #64 from xsnippet/bug/cd-fixes
Use .ssh/config to setup SSH proxy jump
2 parents 1312406 + 9d9e6d9 commit 0e1a461

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/cd.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,20 @@ jobs:
3737
# Ensure that servers we're deploying to are known. Otherwise,
3838
# Ansible may fail with host key verification error.
3939
mkdir -p ~/.ssh && echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
40+
cat <<EOF > ~/.ssh/config
41+
Host _jumphost
42+
User bunny
43+
HostName hoth.kalnytskyi.com
44+
IdentityFile ${{ steps.ssh-key.outputs.uri }}
45+
46+
Host xsnippet.org
47+
HostName 2a02:8084:4:e480:244a:d5a5:ac59:617d
48+
ProxyJump _jumphost
49+
IdentityFile ${{ steps.ssh-key.outputs.uri }}
50+
EOF
4051
4152
ansible-playbook \
4253
-vv \
43-
-e ansible_ssh_private_key_file="${{ steps.ssh-key.outputs.uri }}" \
4454
-e goaccess_basicauth_password="${{ secrets.GOACCESS_PASSWORD }}" \
4555
--inventory inventories/production \
4656
site.yml

inventories/production/hosts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[xsnippet]
2-
2a02:8084:4:e480:244a:d5a5:ac59:617d
2+
xsnippet.org
33

44
[xsnippet:vars]
55
ansible_user = provisioner
6-
ansible_ssh_common_args = -J [email protected]

0 commit comments

Comments
 (0)