From d6369efd46e00c31b6ee9a109014da9e8659e2c4 Mon Sep 17 00:00:00 2001 From: Sander Hoentjen Date: Mon, 25 Mar 2013 14:45:56 +0100 Subject: fix subscribe --- manifests/host/cgi.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/host') diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index 9980856..8a956bf 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -2,7 +2,7 @@ class munin::host::cgi { exec{'set_modes_for_cgi': command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', refreshonly => true, - subscribe => File['/etc/munin/munin.conf.header'], + subscribe => Concat::Fragment['munin.conf.header'], } file{'/etc/logrotate.d/munin': -- cgit v1.2.3 From 8a956cc2f1ad97d06e9a267312e55260ecb29eac Mon Sep 17 00:00:00 2001 From: Sander Hoentjen Date: Mon, 25 Mar 2013 14:46:25 +0100 Subject: linting --- manifests/host/cgi.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/host') diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index 8a956bf..a19c432 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -1,6 +1,7 @@ class munin::host::cgi { exec{'set_modes_for_cgi': command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', + command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', refreshonly => true, subscribe => Concat::Fragment['munin.conf.header'], } -- cgit v1.2.3 From eb0c5f288815abf49b8a7f28979a2777938648c7 Mon Sep 17 00:00:00 2001 From: Sander Hoentjen Date: Mon, 25 Mar 2013 19:06:36 +0100 Subject: fix duplicate command introduced by previous merge --- manifests/host/cgi.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/host') diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index a19c432..4c0d0c9 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -1,6 +1,5 @@ class munin::host::cgi { exec{'set_modes_for_cgi': - command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', refreshonly => true, subscribe => Concat::Fragment['munin.conf.header'], -- cgit v1.2.3 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/cgi.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'manifests/host') diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index 4c0d0c9..6e5efcd 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -1,6 +1,8 @@ -class munin::host::cgi { +class munin::host::cgi( + $owner = 'apache' +) { exec{'set_modes_for_cgi': - command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', + command => "chgrp ${owner} /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R ${owner} {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;", refreshonly => true, subscribe => Concat::Fragment['munin.conf.header'], } -- 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/cgi.pp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'manifests/host') diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index 1c0072d..5b0ecbb 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -1,3 +1,4 @@ +# Set up a munin host using CGI rendering class munin::host::cgi( $owner = 'os_default' ) { @@ -31,9 +32,11 @@ class munin::host::cgi( file{'/etc/logrotate.d/munin': source => [ "puppet:///modules/site_munin/config/host/${::fqdn}/logrotate", "puppet:///modules/site_munin/config/host/logrotate.${::operatingsystem}", - "puppet:///modules/site_munin/config/host/logrotate", + 'puppet:///modules/site_munin/config/host/logrotate', "puppet:///modules/munin/config/host/logrotate.${::operatingsystem}", - "puppet:///modules/munin/config/host/logrotate" ], - owner => root, group => 0, mode => 0644; + 'puppet:///modules/munin/config/host/logrotate' ], + owner => root, + group => 0, + mode => '0644', } } -- cgit v1.2.3 From 9bee8a31f2305dda884aeab3caf3bf91cd8603ba Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 2 Jul 2013 23:07:00 +0200 Subject: Unify logrotate files into templates --- manifests/host/cgi.pp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'manifests/host') diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index 5b0ecbb..9951a48 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -30,13 +30,9 @@ class munin::host::cgi( } file{'/etc/logrotate.d/munin': - source => [ "puppet:///modules/site_munin/config/host/${::fqdn}/logrotate", - "puppet:///modules/site_munin/config/host/logrotate.${::operatingsystem}", - 'puppet:///modules/site_munin/config/host/logrotate', - "puppet:///modules/munin/config/host/logrotate.${::operatingsystem}", - 'puppet:///modules/munin/config/host/logrotate' ], - owner => root, - group => 0, - mode => '0644', + content => template("${module_name}/logrotate.conf.erb"), + owner => root, + group => 0, + mode => '0644', } } -- cgit v1.2.3