clvx.openvpn
OpenVPN
This is a role for installing, configuring, and updating OpenVPN servers and clients.
Future Work
- Possibly adding PAM support.
Requirements
- Ansible version 2.1 or higher
- Ubuntu version 16.04 or higher
Role Variables
Variable Name | Default Value | Description |
---|---|---|
openvpn_port | 1194 | The default port used by OpenVPN |
openvpn_proto | udp | The default protocol used |
openvpn_server_dh | 2048 | The size of the Diffie-Hellman key |
openvpn_dir | /etc/openvpn | The directory for OpenVPN server files |
openvpn_keydir | "{{ openvpn_dir }}/keys" | The directory for OpenVPN server keys |
deploy_key_dir | "{{ role_path }}/files" | The local directory for keys |
local_openvpn_keydir | "{{ deploy_key_dir }}" | Same as deploy_key_dir |
openvpn_server_dh | "{{ lookup('pipe', 'basename {{ deploy_key_dir }}/dh*.pem | cut -d. -f1') }}" |
openvpn_tls_push | True | If true, sends secret.key to servers and clients |
openvpn_is_client | False | If true, marks the host as a client |
openvpn_is_server | False | If true, marks the host as a server |
Dependencies (Optional)
This role works better if you use clvx.easy-rsa
to create your Public Key Infrastructure (PKI).
- clvx.easy-rsa
Example Playbook
Inventory
localhost
group_vars/localhost.yml
--- openvpn_is_client: True
or:
---
openvpn_is_server: True
Note: You cannot set both openvpn_is_client
and openvpn_is_server
to true at the same time, or it will fail.
Playbook:
- hosts: localhost roles: - openvpn
License
GPLv3
Author Information
Luis Michael Ibarra
Follow me on Twitter, IRC, and Reddit: clvx.
Informazioni sul progetto
Role to deploy server and openvpn clients.
Installa
ansible-galaxy install clvx.openvpn
Licenza
gpl-3.0
Download
119
Proprietario
Linux, Networking and sometimes a coder.