Skip to content

Commit

Permalink
Extract initialization of config as a separate step
Browse files Browse the repository at this point in the history
  • Loading branch information
duksis committed Mar 13, 2020
1 parent d185ce2 commit 9054f2e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ commands:
sudo add-apt-repository ppa:wireguard/wireguard -y
sudo apt-get update
sudo apt-get install wireguard-dkms wireguard-tools linux-headers-$(uname -r)
connect:
description: "Connect to WireGuard VPN"
initialize:
description: "Initialize WireGuard"
parameters:
config:
description: |
Expand All @@ -35,6 +35,9 @@ commands:
sed "s/0.0.0.0\/0/$(curl -s https://ifconfig.me)/g" > wg0.conf
sudo mv wg0.conf /etc/wireguard/wg0.conf
sudo chmod 600 /etc/wireguard/wg0.conf
connect:
description: "Connect to WireGuard VPN"
steps:
- run:
name: Connect to VPN
command: |
Expand All @@ -55,12 +58,13 @@ example:
usage:
version: 2.1
orbs:
wg: titel-media/[email protected]
vpn: titel-media/[email protected]
jobs:
ping:
executor: wg/default
executor: vpn/default
steps:
- wg/install
- wg/connect
- vpn/install
- vpn/initialize
- vpn/connect
- run: ping -c 5 192.0.2.1
- wg/disconnect
- vpn/disconnect

0 comments on commit 9054f2e

Please sign in to comment.