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
systemd:
name: tinc
name: "tinc@{{ icvpn.interface }}"
enabled: yes
state: restarted

View file

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