diff options
author | Micah Anderson <micah@riseup.net> | 2013-02-14 18:47:26 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-02-14 18:47:26 -0500 |
commit | e72f4b51dbc9f183d60251de44e80149d88a1da3 (patch) | |
tree | e90f2d4bb169c0b92ac12d64425d3269c8483ec0 | |
parent | c1ef04bf0bd3dad921c27a0d8ad3c7f6e06977fa (diff) |
lintian of pnp4nagios commits
-rw-r--r-- | manifests/defaults/pnp4nagios.pp | 4 | ||||
-rw-r--r-- | manifests/pnp4nagios.pp | 68 | ||||
-rw-r--r-- | manifests/pnp4nagios/popup.pp | 16 |
3 files changed, 48 insertions, 40 deletions
diff --git a/manifests/defaults/pnp4nagios.pp b/manifests/defaults/pnp4nagios.pp index f6556c9..2ad8767 100644 --- a/manifests/defaults/pnp4nagios.pp +++ b/manifests/defaults/pnp4nagios.pp @@ -10,8 +10,8 @@ class nagios::defaults::pnp4nagios { # nagios host templates # http://docs.pnp4nagios.org/de/pnp-0.6/webfe - - # this doesn't work, see manifests/pnp4nagios.pp + + # this doesn't work, see manifests/pnp4nagios.pp #nagios_host { 'host-pnp': # action_url => '/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_', # register => 0, diff --git a/manifests/pnp4nagios.pp b/manifests/pnp4nagios.pp index 7c960a7..e7d2be1 100644 --- a/manifests/pnp4nagios.pp +++ b/manifests/pnp4nagios.pp @@ -1,57 +1,63 @@ class nagios::pnp4nagios { include nagios::defaults::pnp4nagios - package { pnp4nagios: + package { 'pnp4nagios': ensure => installed } - # unfortunatly i didn't find a way to use nagios_host and nagios_service definition, because - # imho puppet can't handle the "name" variable needed in these 2 definitions - # so we need to copy a file here. + # unfortunatly i didn't find a way to use nagios_host and nagios_service + # definition, because imho puppet can't handle the "name" variable + # needed in these 2 definitions so we need to copy a file here. file { 'pnp4nagios-templates.cfg': - path => "${nagios::defaults::vars::int_cfgdir}/conf.d/pnp4nagios-templates.cfg", - source => [ "puppet:///modules/site-nagios/pnp4nagios/pnp4nagios-templates.cfg", - "puppet:///modules/nagios/pnp4nagios/pnp4nagios-templates.cfg" ], - mode => 0644, owner => root, group => root, - notify => Service['nagios'], + path => "${nagios::defaults::vars::int_cfgdir}/conf.d/pnp4nagios-templates.cfg", + source => [ 'puppet:///modules/site-nagios/pnp4nagios/pnp4nagios-templates.cfg', + 'puppet:///modules/nagios/pnp4nagios/pnp4nagios-templates.cfg' ], + mode => '0644', + owner => root, + group => root, + notify => Service['nagios'], } - + file { 'apache.conf': - path => "/etc/pnp4nagios/apache.conf", - source => [ "puppet:///modules/site-nagios/pnp4nagios/apache.conf", - "puppet:///modules/nagios/pnp4nagios/apache.conf" ], - mode => 0644, owner => root, group => root, - notify => Service['apache'], + path => '/etc/pnp4nagios/apache.conf', + source => [ 'puppet:///modules/site-nagios/pnp4nagios/apache.conf', + 'puppet:///modules/nagios/pnp4nagios/apache.conf' ], + mode => '0644', + owner => root, + group => root, + notify => Service['apache'], require => Package['pnp4nagios'], } # run npcd as daemon file { '/etc/default/npcd': - path => "/etc/default/npcd", - source => [ "puppet:///modules/site-nagios/pnp4nagios/npcd", - "puppet:///modules/nagios/pnp4nagios/npcd" ], - mode => 0644, owner => root, group => root, + path => '/etc/default/npcd', + source => [ 'puppet:///modules/site-nagios/pnp4nagios/npcd', + 'puppet:///modules/nagios/pnp4nagios/npcd' ], + mode => '0644', + owner => root, + group => root, notify => Service['npcd']; } service { 'npcd': - ensure => running, - enable => true, - hasstatus => true, - require => Package['pnp4nagios'], + ensure => running, + enable => true, + hasstatus => true, + require => Package['pnp4nagios'], } - + # modify action.gif - + file { '/usr/share/nagios3/htdocs/images/action.gif': - path => "/usr/share/nagios3/htdocs/images/action.gif", - source => [ "puppet:///modules/site-nagios/pnp4nagios/action.gif", - "puppet:///modules/nagios/pnp4nagios/action.gif" ], - mode => 0644, owner => root, group => root, + path => '/usr/share/nagios3/htdocs/images/action.gif', + source => [ 'puppet:///modules/site-nagios/pnp4nagios/action.gif', + 'puppet:///modules/nagios/pnp4nagios/action.gif' ], + mode => '0644', + owner => root, + group => root, notify => Service['nagios']; } - - } diff --git a/manifests/pnp4nagios/popup.pp b/manifests/pnp4nagios/popup.pp index a8de7c7..80f8def 100644 --- a/manifests/pnp4nagios/popup.pp +++ b/manifests/pnp4nagios/popup.pp @@ -1,17 +1,19 @@ class nagios::pnp4nagios::popup inherits nagios::pnp4nagios { File['pnp4nagios-templates.cfg']{ - source => [ "puppet:///modules/site-nagios/pnp4nagios/pnp4nagios-popup-templates.cfg", - "puppet:///modules/nagios/pnp4nagios/pnp4nagios-popup-templates.cfg" ], + source => [ 'puppet:///modules/site-nagios/pnp4nagios/pnp4nagios-popup-templates.cfg', + 'puppet:///modules/nagios/pnp4nagios/pnp4nagios-popup-templates.cfg' ], } - file { "/usr/share/nagios3/htdocs/ssi": + file { '/usr/share/nagios3/htdocs/ssi': ensure => directory } file { 'status-header.ssi': - path => "/usr/share/nagios3/htdocs/ssi/status-header.ssi", - source => [ "puppet:///modules/site-nagios/pnp4nagios/status-header.ssi", - "puppet:///modules/nagios/pnp4nagios/status-header.ssi"], - mode => 0644, owner => root, group => root, + path => '/usr/share/nagios3/htdocs/ssi/status-header.ssi', + source => [ 'puppet:///modules/site-nagios/pnp4nagios/status-header.ssi', + 'puppet:///modules/nagios/pnp4nagios/status-header.ssi' ], + mode => '0644', + owner => root, + group => root, notify => Service['nagios'], } } |