From 7a13b36953cc4e359a37c0e7fa80a6ee3b452766 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 31 May 2011 19:30:04 +0200 Subject: no need to manage logfiles, this should be done by the package --- manifests/host.pp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index e038fd7..69cc7da 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -23,12 +23,6 @@ class munin::host inherits munin header => "/etc/munin/munin.conf.header", } - file { ["/var/log/munin-update.log", "/var/log/munin-limits.log", - "/var/log/munin-graph.log", "/var/log/munin-html.log"]: - ensure => present, - mode => 640, owner => munin, group => 0; - } - include munin::plugins::muninhost case $operatingsystem { -- cgit v1.2.3 From c88a6c4879e13b95e4fff00ec956557dd5be5689 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 31 May 2011 19:39:20 +0200 Subject: make cgi graphing optional --- manifests/host.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 69cc7da..3e4f5ea 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -25,8 +25,8 @@ class munin::host inherits munin include munin::plugins::muninhost - case $operatingsystem { - centos: { include munin::host::cgi } + if $munin_do_cgi_graphing { + include munin::host::cgi } # from time to time we cleanup hanging munin-runs -- cgit v1.2.3 From 9b0b698523987b7631478bcf7dc84acf5e0e719c Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Thu, 4 Aug 2011 10:48:57 +0200 Subject: move from concatenated_file to concat --- manifests/host.pp | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 3e4f5ea..107cd39 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,32 +2,30 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -class munin::host inherits munin -{ - package {"munin": ensure => installed, } +class munin::host { + package {"munin": ensure => installed, } - File <<| tag == 'munin' |>> + Concat::Fragment <<| tag == 'munin' |>> - file{'/etc/munin/munin.conf.header': - source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header", - "puppet:///modules/site-munin/config/host/munin.conf.header.$operatingsystem", - "puppet:///modules/site-munin/config/host/munin.conf.header", - "puppet:///modules/munin/config/host/munin.conf.header.$operatingsystem", - "puppet:///modules/munin/config/host/munin.conf.header" ], - notify => Exec['concat_/etc/munin/munin.conf'], - owner => root, group => 0, mode => 0644; - } + concat::fragment{'munin.conf.header': + target => '/etc/munin/munin.conf', + source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header", + "puppet:///modules/site-munin/config/host/munin.conf.header.$operatingsystem", + "puppet:///modules/site-munin/config/host/munin.conf.header", + "puppet:///modules/munin/config/host/munin.conf.header.$operatingsystem", + "puppet:///modules/munin/config/host/munin.conf.header" ], + order => 05, + } - concatenated_file { "/etc/munin/munin.conf": - dir => '/var/lib/puppet/modules/munin/nodes', - header => "/etc/munin/munin.conf.header", - } + concat{ "/etc/munin/munin.conf": + owner => root, group => 0, mode => 0644; + } - include munin::plugins::muninhost + include munin::plugins::muninhost - if $munin_do_cgi_graphing { - include munin::host::cgi - } + if $munin_do_cgi_graphing { + include munin::host::cgi + } # from time to time we cleanup hanging munin-runs file{'/etc/cron.d/munin_kill': -- cgit v1.2.3 From 8a2e868c67013f6dcebe722cc1f0c7cbf599b8fc Mon Sep 17 00:00:00 2001 From: "Christian G. Warden" Date: Thu, 2 Feb 2012 18:14:56 -0800 Subject: Make sure concat::setup is declared Make sure concat::setup is declared for /etc/munin/munin.conf. --- manifests/host.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 107cd39..22ffbe2 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -4,6 +4,7 @@ class munin::host { package {"munin": ensure => installed, } + include concat::setup Concat::Fragment <<| tag == 'munin' |>> -- cgit v1.2.3 From c91621a0953d97a83f62205519524708c279a24e Mon Sep 17 00:00:00 2001 From: "Christian G. Warden" Date: Thu, 2 Feb 2012 18:19:33 -0800 Subject: Fix munin.conf for squeeze and later Debian releases Add support for lsbdistcodename-specific munin.conf.header files. Create squeeze munin.conf.header file which contains the new htmldir setting, /var/cache/munin/www, and symlink wheezy and sid to it. --- manifests/host.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 107cd39..a26c013 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -9,10 +9,12 @@ class munin::host { concat::fragment{'munin.conf.header': target => '/etc/munin/munin.conf', - source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header", - "puppet:///modules/site-munin/config/host/munin.conf.header.$operatingsystem", + source => [ "puppet:///modules/site-munin/config/host/${::fqdn}/munin.conf.header", + "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}", + "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}", "puppet:///modules/site-munin/config/host/munin.conf.header", - "puppet:///modules/munin/config/host/munin.conf.header.$operatingsystem", + "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}", + "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}", "puppet:///modules/munin/config/host/munin.conf.header" ], order => 05, } -- cgit v1.2.3 From 9fd1de5acd9064a0d67ca9d2c13a829a3f628f39 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 19:39:49 -0300 Subject: new style for 2.7 --- manifests/host.pp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index e81f08f..524cddf 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,7 +2,9 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -class munin::host { +class munin::host( + $cgi_graphing = false +) { package {"munin": ensure => installed, } include concat::setup @@ -10,10 +12,10 @@ class munin::host { concat::fragment{'munin.conf.header': target => '/etc/munin/munin.conf', - source => [ "puppet:///modules/site-munin/config/host/${::fqdn}/munin.conf.header", - "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}", - "puppet:///modules/site-munin/config/host/munin.conf.header.${::operatingsystem}", - "puppet:///modules/site-munin/config/host/munin.conf.header", + source => [ "puppet:///modules/site_munin/config/host/${::fqdn}/munin.conf.header", + "puppet:///modules/site_munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}", + "puppet:///modules/site_munin/config/host/munin.conf.header.${::operatingsystem}", + "puppet:///modules/site_munin/config/host/munin.conf.header", "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}.${::lsbdistcodename}", "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}", "puppet:///modules/munin/config/host/munin.conf.header" ], @@ -26,7 +28,7 @@ class munin::host { include munin::plugins::muninhost - if $munin_do_cgi_graphing { + if $munin::host::cgi_graphing { include munin::host::cgi } @@ -35,7 +37,7 @@ class munin::host { content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n", owner => root, group => 0, mode => 0644; } - if $use_shorewall { + if hiera('use_shorewall',false) { include shorewall::rules::out::munin } } -- cgit v1.2.3 From c95f0b2fcf4f35b1a7ae3ad9c04600a32ab2bb43 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 13 Jun 2012 20:40:57 -0300 Subject: migrate away from hiera stuff --- manifests/host.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 524cddf..b828e35 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -37,7 +37,7 @@ class munin::host( content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n", owner => root, group => 0, mode => 0644; } - if hiera('use_shorewall',false) { + if $munin::host::manage_shorewall { include shorewall::rules::out::munin } } -- cgit v1.2.3 From 3b10e0eb3fabb19cc0fa9d66f5a8379ae96aeb6f Mon Sep 17 00:00:00 2001 From: Sander Hoentjen Date: Mon, 18 Mar 2013 14:56:44 +0100 Subject: Add support for specifying tags for exported resources This enables you to specify different servers for different clients. --- manifests/host.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index b828e35..05dcb5e 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -3,12 +3,13 @@ # See LICENSE for the full license granted to you. class munin::host( - $cgi_graphing = false + $cgi_graphing = false, + $export_tag = 'munin' ) { package {"munin": ensure => installed, } include concat::setup - Concat::Fragment <<| tag == 'munin' |>> + Concat::Fragment <<| tag == $export_tag |>> concat::fragment{'munin.conf.header': target => '/etc/munin/munin.conf', -- cgit v1.2.3