From cb3abd557431cc04aef5de1b302bcde25cd81c81 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sat, 25 Mar 2017 14:33:23 +0100 Subject: added reload and restart handlers --- roles/install_openvpn/handlers/main.yml | 5 +++++ roles/install_openvpn/tasks/main.yml | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 roles/install_openvpn/handlers/main.yml (limited to 'roles/install_openvpn') diff --git a/roles/install_openvpn/handlers/main.yml b/roles/install_openvpn/handlers/main.yml new file mode 100644 index 0000000..da582dc --- /dev/null +++ b/roles/install_openvpn/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: restart openvpn + systemd: + name: openvpn-client@mullvad.service + state: restarted diff --git a/roles/install_openvpn/tasks/main.yml b/roles/install_openvpn/tasks/main.yml index 9d35547..2f5d7fb 100644 --- a/roles/install_openvpn/tasks/main.yml +++ b/roles/install_openvpn/tasks/main.yml @@ -8,32 +8,38 @@ copy: src: ca.crt dest: /etc/openvpn/client/ca.crt + notify: restart openvpn - name: install crl.pem copy: src: crl.pem dest: /etc/openvpn/client/crl.pem + notify: restart openvpn - name: install mullvad-up.sh copy: src: mullvad-up.sh dest: /etc/openvpn/client/mullvad-up.sh mode: 0744 + notify: restart openvpn - name: install mullvad.conf template: src: mullvad.conf.j2 dest: /etc/openvpn/client/mullvad.conf + notify: restart openvpn - name: install mullvad.key template: src: mullvad.key.j2 dest: /etc/openvpn/client/mullvad.key + notify: restart openvpn - name: install mullvad.crt template: src: mullvad.crt.j2 dest: /etc/openvpn/client/mullvad.crt + notify: restart openvpn - name: create sysetmd openvpn folder file: -- cgit v1.2.3-54-g00ecf