diff --git a/roles/handlers/handlers/main.yml b/roles/handlers/handlers/main.yml index c89973c..bedfd6c 100644 --- a/roles/handlers/handlers/main.yml +++ b/roles/handlers/handlers/main.yml @@ -57,7 +57,7 @@ - name: restart systemd unit tinc systemd: - name: tinc + name: "tinc@{{ icvpn.interface }}" enabled: yes state: restarted diff --git a/roles/service-tinc/tasks/main.yml b/roles/service-tinc/tasks/main.yml index 5ee461d..263e790 100644 --- a/roles/service-tinc/tasks/main.yml +++ b/roles/service-tinc/tasks/main.yml @@ -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