From e08086847d01163d26ba8b26fe9d6e16b69c629d Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Mon, 28 Feb 2022 13:16:03 +0100 Subject: [PATCH] Move service enabling into handler --- roles/protonvpn/handlers/main.yml | 5 +++++ roles/protonvpn/tasks/main.yml | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 roles/protonvpn/handlers/main.yml diff --git a/roles/protonvpn/handlers/main.yml b/roles/protonvpn/handlers/main.yml new file mode 100644 index 0000000..6b46cc7 --- /dev/null +++ b/roles/protonvpn/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: Enable protonvpn service + systemd: + name: openvpn-client@fr.protonvpn.com.udp + enabled: true diff --git a/roles/protonvpn/tasks/main.yml b/roles/protonvpn/tasks/main.yml index 501ffc6..5716374 100644 --- a/roles/protonvpn/tasks/main.yml +++ b/roles/protonvpn/tasks/main.yml @@ -36,8 +36,4 @@ owner: root group: root remote_src: yes - -- name: Enable protonvpn service - systemd: - name: openvpn-client@fr.protonvpn.com.udp - enabled: true + notify: Enable protonvpn service