Skip to content

Commit

Permalink
use new config script for openvpn
Browse files Browse the repository at this point in the history
  • Loading branch information
cguertin14 committed Dec 16, 2024
1 parent 5ed75fe commit 391ae16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ansible-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ jobs:
- name: Setup VPN config
run: |
echo -n "${{ secrets.VPN_CONFIG }}" | base64 -d > config.ovpn
sudo openvpn3 config-import --config config.ovpn --name HOME_VPN
sudo openvpn3 config-manage --config HOME_VPN --allow-compression yes
- name: Connect VPN
run: sudo openvpn3 session-start --dco true --config config.ovpn
run: sudo openvpn3 session-start --config HOME_VPN

- name: Wait for a VPN connection
timeout-minutes: 1
Expand Down Expand Up @@ -62,4 +64,4 @@ jobs:
- name: Kill VPN connection
if: always()
run: sudo openvpn3 session-manage --config config.ovpn --disconnect
run: sudo openvpn3 session-manage --config HOME_VPN --disconnect
8 changes: 5 additions & 3 deletions .github/workflows/ansible-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
Expand All @@ -24,9 +24,11 @@ jobs:
- name: Setup VPN config
run: |
echo -n "${{ secrets.VPN_CONFIG }}" | base64 -d > config.ovpn
sudo openvpn3 config-import --config config.ovpn --name HOME_VPN
sudo openvpn3 config-manage --config HOME_VPN --allow-compression yes
- name: Connect VPN
run: sudo openvpn3 session-start --dco true --config config.ovpn
run: sudo openvpn3 session-start --config HOME_VPN

- name: Wait for a VPN connection
timeout-minutes: 1
Expand Down Expand Up @@ -61,4 +63,4 @@ jobs:
- name: Kill VPN connection
if: always()
run: sudo openvpn3 session-manage --config config.ovpn --disconnect
run: sudo openvpn3 session-manage --config HOME_VPN --disconnect

0 comments on commit 391ae16

Please sign in to comment.