summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fennell <matthew@fennell.dev>2026-09-11 20:50:01 +0100
committerMatthew Fennell <matthew@fennell.dev>2026-09-11 20:50:01 +0100
commit56d72f72db65d02ab2c731f8aa39c0bd5f1d0562 (patch)
treebe1729283c35eed9ba13b6f29266e32af8162c2b
parente70966c0b66111dfecc697a3c8c3d0c1d91fc2a8 (diff)
Add is_controller configurationmain
This is needed for nodes which run on the same box that runs the collector.
-rw-r--r--munin-node/defaults/main.yml1
-rw-r--r--munin-node/tasks/main.yml1
-rw-r--r--munin-node/templates/munin-node.conf.j22
3 files changed, 4 insertions, 0 deletions
diff --git a/munin-node/defaults/main.yml b/munin-node/defaults/main.yml
index 6b7606b..1be1e27 100644
--- a/munin-node/defaults/main.yml
+++ b/munin-node/defaults/main.yml
@@ -5,3 +5,4 @@
---
extra_profiles: []
+is_controller: false
diff --git a/munin-node/tasks/main.yml b/munin-node/tasks/main.yml
index f068eb5..f1edc30 100644
--- a/munin-node/tasks/main.yml
+++ b/munin-node/tasks/main.yml
@@ -29,6 +29,7 @@
state: enabled
loop:
- 4949 # Munin
+ when: not is_controller
become: true
- name: Ensure munin is configured
diff --git a/munin-node/templates/munin-node.conf.j2 b/munin-node/templates/munin-node.conf.j2
index 81400a9..faba6d4 100644
--- a/munin-node/templates/munin-node.conf.j2
+++ b/munin-node/templates/munin-node.conf.j2
@@ -48,7 +48,9 @@ host_name {{ hostname }}
allow ^127\.0\.0\.1$
allow ^::1$
+{% if not is_controller %}
allow ^{{ munin_host }}$
+{% endif %}
# If you have installed the Net::CIDR perl module, you can use one or more
# cidr_allow and cidr_deny address/mask patterns. A connecting client must