28 lines
533 B
YAML
28 lines
533 B
YAML
---
|
|
- name: "Install openvpn-server via apt"
|
|
apt:
|
|
update_cache: yes
|
|
state: present
|
|
name:
|
|
- openvpn-server
|
|
|
|
- name : "Enable ipv4 forwarding via sysctl"
|
|
ansible.posix.sysctl:
|
|
name: net.ipv4.ip_forward
|
|
value: '1'
|
|
sysctl_set: yes
|
|
state: present
|
|
reload: yes
|
|
|
|
- name: Upload openvpn config to server
|
|
ansible.posix.synchronize:
|
|
src: openvpn-config
|
|
dest: /etc/openvpn/server
|
|
|
|
- name: Enable and restart openvpn daemon
|
|
service:
|
|
name: openvpn
|
|
state: restarted
|
|
enabled: yes
|
|
...
|