summaryrefslogtreecommitdiffstats
path: root/roles/common/templates/etc/munin
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-05-22 17:00:58 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-05-22 17:53:58 +0200
commit82d27fabc7becba1d1ee7c24b331522f2330cae6 (patch)
treee2c2ecccedfb5a340144f36605f07669b7d6059b /roles/common/templates/etc/munin
parentb331c2f99c1217c6f4208159c64ca6a5b0053bc7 (diff)
Tunnel munin-update traffic through IPSec.
Diffstat (limited to 'roles/common/templates/etc/munin')
-rw-r--r--roles/common/templates/etc/munin/munin-node.conf.j29
1 files changed, 5 insertions, 4 deletions
diff --git a/roles/common/templates/etc/munin/munin-node.conf.j2 b/roles/common/templates/etc/munin/munin-node.conf.j2
index de4098a..d0004b7 100644
--- a/roles/common/templates/etc/munin/munin-node.conf.j2
+++ b/roles/common/templates/etc/munin/munin-node.conf.j2
@@ -32,7 +32,7 @@ ignore_file \.rpm(save|new)$
ignore_file \.pod$
# Set this if the client doesn't report the correct hostname when
-# telnetting to localhost, port 4949
+# telnetting to {{ ipsec[inventory_hostname_short] }}, port 4949
#
host_name {{ inventory_hostname_short }}
@@ -41,11 +41,12 @@ host_name {{ inventory_hostname_short }}
# network notation unless the perl module Net::CIDR is installed. You
# may repeat the allow line as many times as you'd like
-allow ^127\.0\.0\.1$
-allow ^::1$
+{% for host in groups['munin-master'] %}
+allow ^{{ ipsec[ hostvars[host].inventory_hostname_short ] | ipv4 | replace(".","\.") }}$
+{% endfor %}
# Which address to bind to;
-host 127.0.0.1
+host {{ ipsec[inventory_hostname_short] }}
# And which port
port 4994