Role service-tinc: fix handling of systemd unit

* remove init script if present
* nets.boot not necessary with new systemd unit
* update systemd tasks to use systemd unit tinc@
* update handler
This commit is contained in:
Tobias Hachmer 2017-12-29 14:27:52 +01:00
parent 0a51ee02a3
commit a2104ddcc5
2 changed files with 7 additions and 10 deletions

View file

@ -57,7 +57,7 @@
- name: restart systemd unit tinc - name: restart systemd unit tinc
systemd: systemd:
name: tinc name: "tinc@{{ icvpn.interface }}"
enabled: yes enabled: yes
state: restarted state: restarted

View file

@ -71,17 +71,14 @@
group: admin group: admin
notify: restart systemd unit tinc notify: restart systemd unit tinc
- name: write nets.boot - name: remove tinc init file if present
template: file:
src: nets.boot.j2 path: /etc/init.d/tinc
dest: /etc/tinc/nets.boot state: absent
mode: 0644 notify: reload systemd
owner: root
group: root
notify: restart systemd unit tinc
- name: configure systemd unit tinc - name: configure systemd unit tinc
systemd: systemd:
name: tinc name: "tinc@{{ icvpn.interface }}"
enabled: yes enabled: yes
state: started state: started