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/client/base.pp | 26 ++++++++++++++++---------- manifests/client/centos.pp | 1 + manifests/client/darwin.pp | 29 +++++++++++++++-------------- manifests/client/debian.pp | 9 +++++---- manifests/client/gentoo.pp | 3 ++- manifests/client/openbsd.pp | 2 +- manifests/client/package.pp | 1 + 7 files changed, 41 insertions(+), 30 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 78398a9..3c0ba89 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,24 +1,30 @@ +# Install a basic munin client class munin::client::base { service { 'munin-node': - ensure => running, - enable => true, - hasstatus => true, + ensure => running, + enable => true, + hasstatus => true, hasrestart => true, } file {'/etc/munin': ensure => directory, - mode => 0755, owner => root, group => 0; + mode => '0755', + owner => root, + group => 0, } file {'/etc/munin/munin-node.conf': content => template("munin/munin-node.conf.${::operatingsystem}"), - notify => Service['munin-node'], - mode => 0644, owner => root, group => 0, + notify => Service['munin-node'], + mode => '0644', + owner => root, + group => 0, + } + $host = $munin::client::host ? { + '*' => $::fqdn, + default => $munin::client::host } munin::register { $::fqdn: - host => $munin::client::host ? { - '*' => $::fqdn, - default => $munin::client::host - }, + host => $host, port => $munin::client::port, use_ssh => $munin::client::use_ssh, config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], diff --git a/manifests/client/centos.pp b/manifests/client/centos.pp index 3a7151b..cd4f2f6 100644 --- a/manifests/client/centos.pp +++ b/manifests/client/centos.pp @@ -1,3 +1,4 @@ +# Install a munin client on centos class munin::client::centos inherits munin::client::package { include munin::plugins::centos } diff --git a/manifests/client/darwin.pp b/manifests/client/darwin.pp index 264263d..7639896 100644 --- a/manifests/client/darwin.pp +++ b/manifests/client/darwin.pp @@ -1,21 +1,22 @@ +# Install a munin client on darwin class munin::client::darwin { - file { "/usr/share/snmp/snmpd.conf": - mode => 744, - content => template("munin/darwin_snmpd.conf.erb"), - group => 0, - owner => root, + file { '/usr/share/snmp/snmpd.conf': + mode => '0744', + content => template('munin/darwin_snmpd.conf.erb'), + group => 0, + owner => root, } - line{"startsnmpdno": - file => "/etc/hostconfig", - line => "SNMPSERVER=-NO-", - ensure => 'absent', + line{'startsnmpdno': + ensure => absent, + file => '/etc/hostconfig', + line => 'SNMPSERVER=-NO-', } - line { "startsnmpdyes": - file => "/etc/hostconfig", - line => "SNMPSERVER=-YES-", - notify => Exec["/sbin/SystemStarter start SNMP"], + line { 'startsnmpdyes': + file => '/etc/hostconfig', + line => 'SNMPSERVER=-YES-', + notify => Exec['/sbin/SystemStarter start SNMP'], } - exec{"/sbin/SystemStarter start SNMP": + exec{'/sbin/SystemStarter start SNMP': noop => false, } munin::register::snmp { $::fqdn: } diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp index e67ac26..3cfc3fc 100644 --- a/manifests/client/debian.pp +++ b/manifests/client/debian.pp @@ -1,15 +1,16 @@ +# Install the munin client on debian class munin::client::debian inherits munin::client::package { # the plugin will need that - package { "iproute": ensure => installed } + package { 'iproute': ensure => installed } - Service["munin-node"]{ + Service['munin-node']{ # sarge's munin-node init script has no status hasstatus => $::lsbdistcodename ? { sarge => false, default => true } } - File["/etc/munin/munin-node.conf"]{ + File['/etc/munin/munin-node.conf']{ content => template("munin/munin-node.conf.${::operatingsystem}.${::lsbdistcodename}"), } # workaround bug in munin_node_configure - plugin { "postfix_mailvolume": ensure => absent } + plugin { 'postfix_mailvolume': ensure => absent } include munin::plugins::debian } diff --git a/manifests/client/gentoo.pp b/manifests/client/gentoo.pp index e79f6b0..186950b 100644 --- a/manifests/client/gentoo.pp +++ b/manifests/client/gentoo.pp @@ -1,7 +1,8 @@ +# install a munin client on gentoo class munin::client::gentoo inherits munin::client::package { Package['munin-node'] { - name => 'munin', + name => 'munin', category => 'net-analyzer', } diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp index cd21abf..e3c18d5 100644 --- a/manifests/client/openbsd.pp +++ b/manifests/client/openbsd.pp @@ -4,7 +4,7 @@ class munin::client::openbsd inherits munin::client::base { if $::operatingsystemrelease == '4.3' { file{'/usr/src/munin_openbsd.tar.gz': - source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", + source => 'puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz', owner => root, group => 0, mode => '0600'; diff --git a/manifests/client/package.pp b/manifests/client/package.pp index 206ccc8..0958202 100644 --- a/manifests/client/package.pp +++ b/manifests/client/package.pp @@ -1,3 +1,4 @@ +# Install a munin client using packages class munin::client::package inherits munin::client::base { package { 'munin-node': ensure => installed } Service['munin-node']{ -- cgit v1.2.3