59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
|
---
|
||
|
- name: Require ppp installed
|
||
|
apt:
|
||
|
name: ['pptp-linux', 'pptpd']
|
||
|
state: latest
|
||
|
|
||
|
- name: Ensure pptp options
|
||
|
template:
|
||
|
src: ivacy/options.pptp.j2
|
||
|
dest: /etc/ppp/options.pptp
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
notify: restart_ivacy
|
||
|
|
||
|
- name: Ensure ivacy configuration
|
||
|
template:
|
||
|
src: ivacy/ivacy_config
|
||
|
dest: "/etc/ppp/peers/{{ gateway.ivacy.config_name|default('ivacy') }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
notify: restart_ivacy
|
||
|
|
||
|
- name: Ensure ppp chap secrets
|
||
|
template:
|
||
|
src: ivacy/chap-secrets.j2
|
||
|
dest: /etc/ppp/chap-secrets
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
notify: restart_ivacy
|
||
|
|
||
|
- name: Ensure script to verify ip is present
|
||
|
copy:
|
||
|
src: files/verify_ip.sh
|
||
|
dest: /usr/local/bin/verify_ip.sh
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0755
|
||
|
notify: restart_ivacy
|
||
|
|
||
|
- name: Ensure ivacy service unit
|
||
|
template:
|
||
|
src: ivacy/ivacy-ppp.service.j2
|
||
|
dest: /etc/systemd/system/ivacy-ppp.service
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
notify: reload_and_restart_ivacy
|
||
|
|
||
|
- name: Ensure ivacy service is enabled and running
|
||
|
systemd:
|
||
|
name: ivacy-ppp.service
|
||
|
enabled: yes
|
||
|
masked: no
|
||
|
state: started
|
||
|
notify: restart_ivacy
|