30 lines
605 B
YAML
30 lines
605 B
YAML
---
|
|
- name: Ensure openvpn is installed
|
|
apt:
|
|
name: openvpn
|
|
state: present
|
|
|
|
- name: Ensure config files are present
|
|
copy:
|
|
src: vpn/
|
|
dest: /etc/openvpn/client/
|
|
mode: 0600
|
|
owner: root
|
|
group: root
|
|
notify: Restart openvpn
|
|
|
|
- name: Ensure the passfile is present
|
|
template:
|
|
src: passfile.j2
|
|
dest: /etc/openvpn/client/login.txt
|
|
mode: 0600
|
|
owner: root
|
|
group: root
|
|
notify: Restart openvpn
|
|
|
|
- name: Ensure openvpn is enabled and started
|
|
systemd:
|
|
name: "openvpn-client@{{ torrent_server.openvpn.outserver }}.service"
|
|
state: started
|
|
enabled: yes
|