From b4e1edbf5d7639db8edb7bae28ddf6788175b8d0 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Thu, 18 Mar 2021 23:45:35 +0000 Subject: [PATCH] munin-node: Run munin-node-configure when needed --- roles/munin-node/handlers/main.yml | 4 ++++ roles/munin-node/tasks/main.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/munin-node/handlers/main.yml b/roles/munin-node/handlers/main.yml index 257442f..5588bd3 100644 --- a/roles/munin-node/handlers/main.yml +++ b/roles/munin-node/handlers/main.yml @@ -3,3 +3,7 @@ service: name: "{{ munin_node_service }}" state: restarted + +- name: munin-node configure + shell: munin-node-configure --shell --remove-also 2> /dev/null | /bin/sh + notify: restart munin-node diff --git a/roles/munin-node/tasks/main.yml b/roles/munin-node/tasks/main.yml index d1c8a24..661514c 100644 --- a/roles/munin-node/tasks/main.yml +++ b/roles/munin-node/tasks/main.yml @@ -15,7 +15,7 @@ mode: 0644 owner: root group: "{{ ansible_wheel }}" - notify: restart munin-node + notify: munin-node configure - name: enable service service: