From 2711b5344319553374d6cfd87d00704595db628d Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Thu, 15 Feb 2024 10:01:37 +0100 Subject: [PATCH] handler --- roles/mgrote_wireguard/handlers/main.yml | 5 +++++ roles/mgrote_wireguard/tasks/main.yml | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 roles/mgrote_wireguard/handlers/main.yml diff --git a/roles/mgrote_wireguard/handlers/main.yml b/roles/mgrote_wireguard/handlers/main.yml new file mode 100644 index 00000000..23a0f083 --- /dev/null +++ b/roles/mgrote_wireguard/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: Ensure resolvconf is configured + become: true + ansible.builtin.command: ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf +... diff --git a/roles/mgrote_wireguard/tasks/main.yml b/roles/mgrote_wireguard/tasks/main.yml index aedf5842..5e7d18ce 100644 --- a/roles/mgrote_wireguard/tasks/main.yml +++ b/roles/mgrote_wireguard/tasks/main.yml @@ -5,10 +5,8 @@ name: - wireguard state: present - -- name: Ensure resolvconf is configured - become: true - ansible.builtin.command: ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf + notify: + - Ensure resolvconf is configured - name: Ensure profiles are templated become: true