diff options
author | Micah Anderson <micah@riseup.net> | 2013-04-17 16:36:37 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-04-17 16:36:37 -0400 |
commit | 8f7c0071eb82591477876eeb3f309067853a3261 (patch) | |
tree | b095f01b960b7ba3699da2dfa4d84cd5bb8a6361 /manifests/host/cgi.pp | |
parent | ea31faee76141646c173d88bd5bec5aa4a773c1c (diff) | |
parent | a5ce0a9317fc5dd5228cff4c5b6d36366c17b6d5 (diff) |
Merge branch 'master' into leap
Conflicts:
README
manifests/host/cgi.pp
Diffstat (limited to 'manifests/host/cgi.pp')
-rw-r--r-- | manifests/host/cgi.pp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp index ab09168..0c11d32 100644 --- a/manifests/host/cgi.pp +++ b/manifests/host/cgi.pp @@ -1,27 +1,27 @@ -class munin::host::cgi inherits munin::host { +class munin::host::cgi { - case $operatingsystem { - debian: { - exec { 'set_modes_for_cgi': - command => 'chgrp www-data /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/cache/munin/www/* -maxdepth 1 -type d -exec chgrp -R www-data {} \; && find /var/www/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;', - refreshonly => true, - subscribe => File['/etc/munin/munin.conf.header'], - } + case $::operatingsystem { + debian,ubuntu: { + $apache_user = 'www-data' + $document_root = '/var/www/munin' } default: { - 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'], - } + $apache_user = 'apache' + $document_root = '/var/www/html/munin' } } - + + exec{'set_modes_for_cgi': + command => "chgrp ${apache_user} /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find ${document_root}/* -maxdepth 1 -type d -exec chgrp -R ${apache_user} {} \; && find ${document_root}/* -maxdepth 1 -type d -exec chmod -R g+w {} \;", + refreshonly => true, + subscribe => Concat::Fragment['munin.conf.header'], + } + 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", + 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; } |