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:
parent
0a51ee02a3
commit
a2104ddcc5
2 changed files with 7 additions and 10 deletions
|
@ -57,7 +57,7 @@
|
|||
|
||||
- name: restart systemd unit tinc
|
||||
systemd:
|
||||
name: tinc
|
||||
name: "tinc@{{ icvpn.interface }}"
|
||||
enabled: yes
|
||||
state: restarted
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue