From e9f80adaa87d5a6a906e406792629372ad15cc5f Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 May 2013 17:31:14 +0200 Subject: Make the CGI owner configurable --- manifests/host.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 05dcb5e..0992d2b 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -4,6 +4,7 @@ class munin::host( $cgi_graphing = false, + $cgi_owner = 'apache', $export_tag = 'munin' ) { package {"munin": ensure => installed, } @@ -30,7 +31,9 @@ class munin::host( include munin::plugins::muninhost if $munin::host::cgi_graphing { - include munin::host::cgi + class {'munin::host::cgi': + owner => $cgi_owner, + } } # from time to time we cleanup hanging munin-runs -- cgit v1.2.3 From aaf55c9ebfa0e34f63b2ca3c2b660e1d164026dd Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 May 2013 18:13:12 +0200 Subject: lintify --- manifests/host.pp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 007c43a..e666c3d 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -7,7 +7,7 @@ class munin::host( $cgi_owner = 'os_default', $export_tag = 'munin' ) { - package {"munin": ensure => installed, } + package {'munin': ensure => installed, } include concat::setup Concat::Fragment <<| tag == $export_tag |>> @@ -17,15 +17,17 @@ class munin::host( 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/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" ], - order => 05, + 'puppet:///modules/munin/config/host/munin.conf.header' ], + order => 05, } - concat{ "/etc/munin/munin.conf": - owner => root, group => 0, mode => 0644; + concat{ '/etc/munin/munin.conf': + owner => root, + group => 0, + mode => '0644', } include munin::plugins::muninhost @@ -39,7 +41,9 @@ class munin::host( # from time to time we cleanup hanging munin-runs file{'/etc/cron.d/munin_kill': 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; + owner => root, + group => 0, + mode => '0644', } if $munin::host::manage_shorewall { include shorewall::rules::out::munin -- cgit v1.2.3 From 39eb7ac31ad7f1fc16c37c42823fb1860c1f09ba Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 9 Jul 2014 23:12:27 +0200 Subject: get rid off lsb facts - who runs sarge? --- 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 e666c3d..55e28bf 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -15,10 +15,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}.${::operatingsystemmajrelease}", "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}.${::operatingsystemmajrelease}", "puppet:///modules/munin/config/host/munin.conf.header.${::operatingsystem}", 'puppet:///modules/munin/config/host/munin.conf.header' ], order => 05, -- cgit v1.2.3 From 37fef292f1c61cb5ca20b60d625310f3150175b0 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Wed, 13 Aug 2014 10:18:04 +0200 Subject: Bump concat dependency to get rid of deprecation warning when including concat::setup --- manifests/host.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index e666c3d..70d7116 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -8,7 +8,6 @@ class munin::host( $export_tag = 'munin' ) { package {'munin': ensure => installed, } - include concat::setup Concat::Fragment <<| tag == $export_tag |>> -- cgit v1.2.3 From c39907a4b3acb1413a290b78b3dd3b49b898e210 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Wed, 13 Aug 2014 10:40:45 +0200 Subject: Use cron resource instead of a cron.d file --- manifests/host.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index e666c3d..f231691 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -39,12 +39,12 @@ class munin::host( } # from time to time we cleanup hanging munin-runs - file{'/etc/cron.d/munin_kill': - 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', + cron { 'munin_kill': + command => 'if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi', + minute => ['4', '34'], + user => 'root', } + if $munin::host::manage_shorewall { include shorewall::rules::out::munin } -- cgit v1.2.3 From acfaa47dbdb07805cb07eb72f552d0e9b03ba1c9 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 13 Dec 2014 11:21:09 -0500 Subject: create a single entry point to the module The current state of the module makes it impossible to install a munin server with munin::host, since it depends on resources in munin::client (because of the plugins it installs). Even if we include the munin::client class "just before" munin::host, puppet thinks there are dependency issues. By moving arguments to a single point of entry we can then include all necessary items and puppet will find the needed resources correctly. --- manifests/host.pp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 0e5fb01..9831052 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,11 +2,8 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -class munin::host( - $cgi_graphing = false, - $cgi_owner = 'os_default', - $export_tag = 'munin' -) { +class munin::host { + package {'munin': ensure => installed, } Concat::Fragment <<| tag == $export_tag |>> @@ -31,9 +28,9 @@ class munin::host( include munin::plugins::muninhost - if $munin::host::cgi_graphing { + if $munin::cgi_graphing { class {'munin::host::cgi': - owner => $cgi_owner, + owner => $munin::cgi_owner, } } @@ -44,7 +41,7 @@ class munin::host( user => 'root', } - if $munin::host::manage_shorewall { + if $munin::manage_shorewall { include shorewall::rules::out::munin } } -- cgit v1.2.3 From 633b8083d23011668735823dff4c5af2d491aa0c Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 14 Aug 2015 05:01:32 -0400 Subject: Add an upgrade notice about using the main class The module's behaviour was changed from needing to include two different classes to using only the main class (class munin) directly. However, this change was not documented and it could lead to weird errors related to variables being undefined. --- 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 9831052..ffe7883 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,6 +2,7 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. +# WARNING: this class should not be included directly. See the 'munin' class. class munin::host { package {'munin': ensure => installed, } -- cgit v1.2.3 From 87dc315597e8ed27c2e0907615ede8a3f1521b7a Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Mon, 14 Sep 2015 09:58:18 -0400 Subject: Fix export tag variable scope in munin::host --- 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 ffe7883..dd5720c 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -7,7 +7,7 @@ class munin::host { package {'munin': ensure => installed, } - Concat::Fragment <<| tag == $export_tag |>> + Concat::Fragment <<| tag == $munin::export_tag |>> concat::fragment{'munin.conf.header': target => '/etc/munin/munin.conf', -- cgit v1.2.3