From 057658ba93e2562c596dfa5607836679631be916 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 2 Jul 2013 22:49:02 +0200 Subject: Unify OS specific munin-conf.conf In essence all munin-node.conf files contained the same template, besides a few values. By moving all to a single template, maintenance burden is reduced. To ensure all values are still present in the templates, tests are added. --- templates/munin-node.conf.CentOS | 1 - templates/munin-node.conf.CentOS. | 1 - templates/munin-node.conf.CentOS.5 | 1 - templates/munin-node.conf.Debian | 1 - templates/munin-node.conf.Debian.etch | 39 ------------------ templates/munin-node.conf.Debian.feisty | 1 - templates/munin-node.conf.Debian.gutsy | 1 - templates/munin-node.conf.Debian.hardy | 1 - templates/munin-node.conf.Debian.lenny | 39 ------------------ templates/munin-node.conf.Debian.lucid | 1 - templates/munin-node.conf.Debian.sarge | 1 - templates/munin-node.conf.Debian.sid | 1 - templates/munin-node.conf.Debian.squeeze | 1 - templates/munin-node.conf.Debian.wheezy | 57 -------------------------- templates/munin-node.conf.Gentoo | 1 - templates/munin-node.conf.Gentoo. | 1 - templates/munin-node.conf.OpenBSD | 59 --------------------------- templates/munin-node.conf.Ubuntu | 39 ------------------ templates/munin-node.conf.Ubuntu.precise | 1 - templates/munin-node.conf.Ubuntu.quantal | 1 - templates/munin-node.conf.default | 69 -------------------------------- templates/munin-node.conf.erb | 62 ++++++++++++++++++++++++++++ templates/site.conf | 9 ----- 23 files changed, 62 insertions(+), 326 deletions(-) delete mode 120000 templates/munin-node.conf.CentOS delete mode 120000 templates/munin-node.conf.CentOS. delete mode 120000 templates/munin-node.conf.CentOS.5 delete mode 120000 templates/munin-node.conf.Debian delete mode 100644 templates/munin-node.conf.Debian.etch delete mode 120000 templates/munin-node.conf.Debian.feisty delete mode 120000 templates/munin-node.conf.Debian.gutsy delete mode 120000 templates/munin-node.conf.Debian.hardy delete mode 100644 templates/munin-node.conf.Debian.lenny delete mode 120000 templates/munin-node.conf.Debian.lucid delete mode 120000 templates/munin-node.conf.Debian.sarge delete mode 120000 templates/munin-node.conf.Debian.sid delete mode 120000 templates/munin-node.conf.Debian.squeeze delete mode 100644 templates/munin-node.conf.Debian.wheezy delete mode 120000 templates/munin-node.conf.Gentoo delete mode 120000 templates/munin-node.conf.Gentoo. delete mode 100644 templates/munin-node.conf.OpenBSD delete mode 100644 templates/munin-node.conf.Ubuntu delete mode 120000 templates/munin-node.conf.Ubuntu.precise delete mode 120000 templates/munin-node.conf.Ubuntu.quantal delete mode 100644 templates/munin-node.conf.default create mode 100644 templates/munin-node.conf.erb delete mode 100644 templates/site.conf (limited to 'templates') diff --git a/templates/munin-node.conf.CentOS b/templates/munin-node.conf.CentOS deleted file mode 120000 index 082b30c..0000000 --- a/templates/munin-node.conf.CentOS +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.default \ No newline at end of file diff --git a/templates/munin-node.conf.CentOS. b/templates/munin-node.conf.CentOS. deleted file mode 120000 index 082b30c..0000000 --- a/templates/munin-node.conf.CentOS. +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.default \ No newline at end of file diff --git a/templates/munin-node.conf.CentOS.5 b/templates/munin-node.conf.CentOS.5 deleted file mode 120000 index 082b30c..0000000 --- a/templates/munin-node.conf.CentOS.5 +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.default \ No newline at end of file diff --git a/templates/munin-node.conf.Debian b/templates/munin-node.conf.Debian deleted file mode 120000 index e0646b9..0000000 --- a/templates/munin-node.conf.Debian +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.etch \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.etch b/templates/munin-node.conf.Debian.etch deleted file mode 100644 index 9763772..0000000 --- a/templates/munin-node.conf.Debian.etch +++ /dev/null @@ -1,39 +0,0 @@ -########## -########## Managed by puppet -########## - -log_level 4 -log_file /var/log/munin/munin-node.log -pid_file /var/run/munin/munin-node.pid -background 1 -setseid 1 - -# Which host/port to bind to; -host <%= scope.lookupvar('munin::client::host') %> -port <%= scope.lookupvar('munin::client::port') %> -user root -group root -setsid yes - -# Regexps for files to ignore - -ignore_file ~$ -ignore_file \.bak$ -ignore_file %$ -ignore_file \.dpkg-(tmp|new|old|dist)$ -ignore_file \.rpm(save|new)$ - -# Set this if the client doesn't report the correct hostname when -# telnetting to localhost, port 4949 -# -#host_name localhost.localdomain -host_name <%= scope.lookupvar('::fqdn') %> - -# A list of addresses that are allowed to connect. This must be a -# regular expression, due to brain damage in Net::Server, which -# doesn't understand CIDR-style network notation. You may repeat -# the allow line as many times as you'd like -<% scope.lookupvar('munin::client::allow').each do |allow| -%> -allow <%= "^#{Regexp.escape(allow)}$" %> -<% end -%> - diff --git a/templates/munin-node.conf.Debian.feisty b/templates/munin-node.conf.Debian.feisty deleted file mode 120000 index e0646b9..0000000 --- a/templates/munin-node.conf.Debian.feisty +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.etch \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.gutsy b/templates/munin-node.conf.Debian.gutsy deleted file mode 120000 index e0646b9..0000000 --- a/templates/munin-node.conf.Debian.gutsy +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.etch \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.hardy b/templates/munin-node.conf.Debian.hardy deleted file mode 120000 index e0646b9..0000000 --- a/templates/munin-node.conf.Debian.hardy +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.etch \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.lenny b/templates/munin-node.conf.Debian.lenny deleted file mode 100644 index 9763772..0000000 --- a/templates/munin-node.conf.Debian.lenny +++ /dev/null @@ -1,39 +0,0 @@ -########## -########## Managed by puppet -########## - -log_level 4 -log_file /var/log/munin/munin-node.log -pid_file /var/run/munin/munin-node.pid -background 1 -setseid 1 - -# Which host/port to bind to; -host <%= scope.lookupvar('munin::client::host') %> -port <%= scope.lookupvar('munin::client::port') %> -user root -group root -setsid yes - -# Regexps for files to ignore - -ignore_file ~$ -ignore_file \.bak$ -ignore_file %$ -ignore_file \.dpkg-(tmp|new|old|dist)$ -ignore_file \.rpm(save|new)$ - -# Set this if the client doesn't report the correct hostname when -# telnetting to localhost, port 4949 -# -#host_name localhost.localdomain -host_name <%= scope.lookupvar('::fqdn') %> - -# A list of addresses that are allowed to connect. This must be a -# regular expression, due to brain damage in Net::Server, which -# doesn't understand CIDR-style network notation. You may repeat -# the allow line as many times as you'd like -<% scope.lookupvar('munin::client::allow').each do |allow| -%> -allow <%= "^#{Regexp.escape(allow)}$" %> -<% end -%> - diff --git a/templates/munin-node.conf.Debian.lucid b/templates/munin-node.conf.Debian.lucid deleted file mode 120000 index e0646b9..0000000 --- a/templates/munin-node.conf.Debian.lucid +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.etch \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.sarge b/templates/munin-node.conf.Debian.sarge deleted file mode 120000 index e0646b9..0000000 --- a/templates/munin-node.conf.Debian.sarge +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.etch \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.sid b/templates/munin-node.conf.Debian.sid deleted file mode 120000 index 6b8d690..0000000 --- a/templates/munin-node.conf.Debian.sid +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.lenny \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.squeeze b/templates/munin-node.conf.Debian.squeeze deleted file mode 120000 index 6b8d690..0000000 --- a/templates/munin-node.conf.Debian.squeeze +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Debian.lenny \ No newline at end of file diff --git a/templates/munin-node.conf.Debian.wheezy b/templates/munin-node.conf.Debian.wheezy deleted file mode 100644 index fe6f27f..0000000 --- a/templates/munin-node.conf.Debian.wheezy +++ /dev/null @@ -1,57 +0,0 @@ -########## -########## Managed by puppet -########## - -log_level 4 -log_file /var/log/munin/munin-node.log -pid_file /var/run/munin/munin-node.pid - -background 1 -setsid 1 - -user root -group root - -# Regexps for files to ignore - -ignore_file ~$ -#ignore_file [#~]$ # FIX doesn't work. '#' starts a comment -ignore_file DEADJOE$ -ignore_file \.bak$ -ignore_file %$ -ignore_file \.dpkg-(tmp|new|old|dist)$ -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 -# -#host_name localhost.localdomain -host_name <%= scope.lookupvar('::fqdn') %> - -# A list of addresses that are allowed to connect. This must be a -# regular expression, since Net::Server does not understand CIDR-style -# network notation unless the perl module Net::CIDR is installed. You -# may repeat the allow line as many times as you'd like - -<% scope.lookupvar('munin::client::allow').each do |allow| -%> -allow <%= "^#{Regexp.escape(allow)}$" %> -<% end -%> - -# 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 -# match any cidr_allow, and not match any cidr_deny. Note that a netmask -# *must* be provided, even if it's /32 -# -# Example: -# -# cidr_allow 127.0.0.1/32 -# cidr_allow 192.0.2.0/24 -# cidr_deny 192.0.2.42/32 - -# Which address to bind to; -host <%= scope.lookupvar('munin::client::host') %> - -# And which port -port <%= scope.lookupvar('munin::client::port') %> - diff --git a/templates/munin-node.conf.Gentoo b/templates/munin-node.conf.Gentoo deleted file mode 120000 index 082b30c..0000000 --- a/templates/munin-node.conf.Gentoo +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.default \ No newline at end of file diff --git a/templates/munin-node.conf.Gentoo. b/templates/munin-node.conf.Gentoo. deleted file mode 120000 index fd16e50..0000000 --- a/templates/munin-node.conf.Gentoo. +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Gentoo \ No newline at end of file diff --git a/templates/munin-node.conf.OpenBSD b/templates/munin-node.conf.OpenBSD deleted file mode 100644 index 14b658e..0000000 --- a/templates/munin-node.conf.OpenBSD +++ /dev/null @@ -1,59 +0,0 @@ -########## -########## Managed by puppet -########## -# -# Example config-file for munin-node -# - -log_level 4 -log_file /var/log/munin/munin-node.log -pid_file /var/run/munin/munin-node.pid - -background 1 -setsid 1 - -user root -group 0 - -# Regexps for files to ignore -ignore_file ~$ -ignore_file DEADJOE$ -ignore_file \.bak$ -ignore_file %$ -ignore_file \.dpkg-(tmp|new|old|dist)$ -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 -# -#host_name localhost.localdomain -host_name <%= scope.lookupvar('::fqdn') %> - -# A list of addresses that are allowed to connect. This must be a -# regular expression, since Net::Server does not understand CIDR-style -# network notation unless the perl module Net::CIDR is installed. You -# may repeat the allow line as many times as you'd like - -<% scope.lookupvar('munin::client::allow').each do |allow| -%> -allow <%= "^#{Regexp.escape(allow)}$" %> -<% end -%> - -# 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 -# match any cidr_allow, and not match any cidr_deny. Note that a netmask -# *must* be provided, even if it's /32 -# -# Example: -# -# cidr_allow 127.0.0.1/32 -# cidr_allow 192.0.2.0/24 -# cidr_deny 192.0.2.42/32 - -# Which address to bind to; -host <%= scope.lookupvar('munin::client::host') %> -# host 127.0.0.1 - -# And which port -port <%= scope.lookupvar('munin::client::port') %> - diff --git a/templates/munin-node.conf.Ubuntu b/templates/munin-node.conf.Ubuntu deleted file mode 100644 index 9763772..0000000 --- a/templates/munin-node.conf.Ubuntu +++ /dev/null @@ -1,39 +0,0 @@ -########## -########## Managed by puppet -########## - -log_level 4 -log_file /var/log/munin/munin-node.log -pid_file /var/run/munin/munin-node.pid -background 1 -setseid 1 - -# Which host/port to bind to; -host <%= scope.lookupvar('munin::client::host') %> -port <%= scope.lookupvar('munin::client::port') %> -user root -group root -setsid yes - -# Regexps for files to ignore - -ignore_file ~$ -ignore_file \.bak$ -ignore_file %$ -ignore_file \.dpkg-(tmp|new|old|dist)$ -ignore_file \.rpm(save|new)$ - -# Set this if the client doesn't report the correct hostname when -# telnetting to localhost, port 4949 -# -#host_name localhost.localdomain -host_name <%= scope.lookupvar('::fqdn') %> - -# A list of addresses that are allowed to connect. This must be a -# regular expression, due to brain damage in Net::Server, which -# doesn't understand CIDR-style network notation. You may repeat -# the allow line as many times as you'd like -<% scope.lookupvar('munin::client::allow').each do |allow| -%> -allow <%= "^#{Regexp.escape(allow)}$" %> -<% end -%> - diff --git a/templates/munin-node.conf.Ubuntu.precise b/templates/munin-node.conf.Ubuntu.precise deleted file mode 120000 index d8fcb24..0000000 --- a/templates/munin-node.conf.Ubuntu.precise +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Ubuntu \ No newline at end of file diff --git a/templates/munin-node.conf.Ubuntu.quantal b/templates/munin-node.conf.Ubuntu.quantal deleted file mode 120000 index d8fcb24..0000000 --- a/templates/munin-node.conf.Ubuntu.quantal +++ /dev/null @@ -1 +0,0 @@ -munin-node.conf.Ubuntu \ No newline at end of file diff --git a/templates/munin-node.conf.default b/templates/munin-node.conf.default deleted file mode 100644 index dc7c4fc..0000000 --- a/templates/munin-node.conf.default +++ /dev/null @@ -1,69 +0,0 @@ -########## -########## Managed by puppet -########## -# -# Example config-file for munin-node -# - -log_level 4 -log_file /var/log/munin-node/munin-node.log -pid_file /var/run/munin/munin-node.pid - -background 1 -setsid 1 - -user root -group 0 - -# This is the timeout for the whole transaction. -# Units are in sec. Default is 15 min -# -# global_timeout 900 - -# This is the timeout for each plugin. -# Units are in sec. Default is 1 min -# -# timeout 60 - -# Regexps for files to ignore -ignore_file [\#~]$ -ignore_file DEADJOE$ -ignore_file \.bak$ -ignore_file %$ -ignore_file \.dpkg-(tmp|new|old|dist)$ -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 -# -#host_name localhost.localdomain -host_name <%= @fqdn %> - -# A list of addresses that are allowed to connect. This must be a -# regular expression, since Net::Server does not understand CIDR-style -# network notation unless the perl module Net::CIDR is installed. You -# may repeat the allow line as many times as you'd like - -<% scope.lookupvar('munin::client::allow').each do |allow| -%> -allow <%= "^#{Regexp.escape(allow)}$" %> -<% end -%> - -# 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 -# match any cidr_allow, and not match any cidr_deny. Note that a netmask -# *must* be provided, even if it's /32 -# -# Example: -# -# cidr_allow 127.0.0.1/32 -# cidr_allow 192.0.2.0/24 -# cidr_deny 192.0.2.42/32 - -# Which address to bind to; -host <%= scope.lookupvar('munin::client::host') %> -# host 127.0.0.1 - -# And which port -port <%= scope.lookupvar('munin::client::port') %> - diff --git a/templates/munin-node.conf.erb b/templates/munin-node.conf.erb new file mode 100644 index 0000000..5e015d2 --- /dev/null +++ b/templates/munin-node.conf.erb @@ -0,0 +1,62 @@ +########## +########## Managed by puppet +########## + +log_level 4 +log_file <%= @log_file %> +pid_file /var/run/munin/munin-node.pid + +background 1 +setsid 1 + +user <%= @user %> +group <%= @group %> + +# This is the timeout for the whole transaction. +# Units are in sec. Default is 15 min +# +# global_timeout 900 + +# This is the timeout for each plugin. +# Units are in sec. Default is 1 min +# +# timeout 60 + +# Regexps for files to ignore +ignore_file [\#~]$ +ignore_file DEADJOE$ +ignore_file \.bak$ +ignore_file %$ +ignore_file \.dpkg-(tmp|new|old|dist)$ +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 +# +host_name <%= scope.lookupvar('::fqdn') %> + +# A list of addresses that are allowed to connect. This must be a +# regular expression, since Net::Server does not understand CIDR-style +# network notation unless the perl module Net::CIDR is installed. You +# may repeat the allow line as many times as you'd like +<% scope.lookupvar('munin::client::allow').each do |allow| -%> +allow <%= "^#{Regexp.escape(allow)}$" %> +<% end -%> + +# 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 +# match any cidr_allow, and not match any cidr_deny. Note that a netmask +# *must* be provided, even if it's /32 +# +# Example: +# +# cidr_allow 127.0.0.1/32 +# cidr_allow 192.0.2.0/24 +# cidr_deny 192.0.2.42/32 + +# Which address to bind to; +host <%= scope.lookupvar('munin::client::host') %> + +# And which port +port <%= scope.lookupvar('munin::client::port') %> diff --git a/templates/site.conf b/templates/site.conf deleted file mode 100644 index 842bde0..0000000 --- a/templates/site.conf +++ /dev/null @@ -1,9 +0,0 @@ - - ServerName <%= @name %> - DocumentRoot /var/cache/munin/www/ - - order allow,deny - Allow from all - - - -- cgit v1.2.3