Config openVPN network.
- pyOpenSSL
openvpn_role: client
- this parameter can have only two values: server or clientopenvpn_server_ip: XXX.XXX.XXX.XXX
- server ipopenvpn_host_cn: first-client
- Common Nameopenvpn_key_size: 4096
- size of the keysopenvpn_network: 10.8.0.0
- VPN subnetopenvpn_netmask: 255.255.255.0
- VPN netmaskopenvpn_local_key_path: keys
- path to the local directory for CA keys.openvpn_port: 1194
- server port to connectopenvpn_proto: udp
- TCP or UDP protocolopenvpn_dev: tun
- tun (routed IP tunnel) or tap (ethernet tunnel)openvpn_options: ["keepalive 10 120", "tls-auth ta.key 0"]
- list of additional params
All params you can see in defaults/main.yml
- hosts: server
roles:
- role: sedovandrew.openvpn
openvpn_role: server
openvpn_host_cn: server
openvpn_options:
- "keepalive 10 120"
- hosts: client1
roles:
- role: sedovandrew.openvpn
openvpn_role: client
openvpn_host_cn: client1
openvpn_server_ip: XXX.XXX.XXX.XXX
Install Molecule and Testinfra for local testing role.
Install pyOpenSSL:
pip install pyOpenSSL
Run test:
molecule test
BSD
Andrey Sedov - [email protected]