Skip to content

Instantly share code, notes, and snippets.

@webchi
Created March 22, 2022 08:47
Show Gist options
  • Save webchi/99b34f2ddafdbcc49b6f294c8c71aabf to your computer and use it in GitHub Desktop.
Save webchi/99b34f2ddafdbcc49b6f294c8c71aabf to your computer and use it in GitHub Desktop.
Openvpn by ansible
---
- name: Install ovpn
hosts: ovpn
become: true
gather_facts: true
roles:
- kyl191.openvpn
vars:
openvpn_ovpn_dir: /etc/openvpn/client
openvpn_server_hostname: <external-host-ip>
openvpn_port: "8500"
openvpn_compression: stub-v2
openvpn_dualstack: false
openvpn_client_to_client: false
openvpn_redirect_gateway: false
openvpn_masquerade_not_snat: true
# Routes to additional networks
openvpn_push:
- route 10.128.0.0 255.255.255.0
- route 10.129.0.0 255.255.255.0
- route 10.130.0.0 255.255.255.0
clients:
- i.ivanov
- p.petrov
openvpn_revoke_these_certs:
- s.sidorov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment