Skip to content

Commit

Permalink
edit install script to install openvpn3
Browse files Browse the repository at this point in the history
  • Loading branch information
cguertin14 committed Aug 3, 2024
1 parent cc6733b commit c4171db
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/ansible-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ jobs:
- name: Check out the codebase.
uses: actions/checkout@v2

- uses: dbritto-dev/openvpn3-action@main
with:
vpn-client-config: ${{ secrets.VPN_CONFIG }}
script: |
sudo openvpn3 sessions-list
- name: Install OpenVPN
run: |
sudo apt-get update
sudo apt-get --assume-yes --no-install-recommends install openvpn3 apt-transport-https curl
sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://packages.openvpn.net/packages-repo.gpg | sudo tee /etc/apt/keyrings/openvpn.asc
DISTRO=$(lsb_release -c | awk '{print $2}')
echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/debian $DISTRO main" | sudo tee /etc/apt/sources.list.d/openvpn-packages.list
sudo apt install openvpn3
- name: Setup VPN config
run: |
echo -n "${{ secrets.VPN_CONFIG }}" | base64 -d > config.ovpn
- name: Connect VPN
run: sudo openvpn3 session-start --dco true --config config.ovpn --background

- name: Wait for a VPN connection
timeout-minutes: 1
Expand Down

0 comments on commit c4171db

Please sign in to comment.