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 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'manifests/client/base.pp') 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'], -- cgit v1.2.3 From d2a2cb77b9a9ca5deddecdec3d14ac763388929e Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 3 Nov 2013 17:46:46 +0100 Subject: cleanup openbsd manual installation + remove unnecessary files The manual OpenBSD installation is now so old and not needed anymore. --- manifests/client/base.pp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'manifests/client/base.pp') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 3c0ba89..e81028d 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,10 +1,14 @@ # Install a basic munin client class munin::client::base { + package { 'munin-node': + ensure => installed + } service { 'munin-node': - ensure => running, - enable => true, - hasstatus => true, - hasrestart => true, + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, + require => Package[munin-node], } file {'/etc/munin': ensure => directory, @@ -14,6 +18,9 @@ class munin::client::base { } file {'/etc/munin/munin-node.conf': content => template("munin/munin-node.conf.${::operatingsystem}"), + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package['munin-node'], notify => Service['munin-node'], mode => '0644', owner => root, -- cgit v1.2.3 From 057658ba93e2562c596dfa5607836679631be916 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 2 Jul 2013 22:49:02 +0200 Subject: Unify OS specific munin-conf.conf In essence all munin-node.conf files contained the same template, besides a few values. By moving all to a single template, maintenance burden is reduced. To ensure all values are still present in the templates, tests are added. --- manifests/client/base.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client/base.pp') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index e81028d..71531fa 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,5 +1,5 @@ # Install a basic munin client -class munin::client::base { +class munin::client::base inherits munin::client::params { package { 'munin-node': ensure => installed } @@ -17,7 +17,7 @@ class munin::client::base { group => 0, } file {'/etc/munin/munin-node.conf': - content => template("munin/munin-node.conf.${::operatingsystem}"), + content => template("${module_name}/munin-node.conf.erb"), # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package['munin-node'], -- cgit v1.2.3 From 695d81c81cd152b5dd7333d0eae2bd6df108a41e Mon Sep 17 00:00:00 2001 From: Arjen Heidinga Date: Fri, 31 Jan 2014 09:52:10 +0100 Subject: Add support for setting the descryption and group support --- manifests/client/base.pp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'manifests/client/base.pp') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 71531fa..d35d742 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -31,11 +31,13 @@ class munin::client::base inherits munin::client::params { default => $munin::client::host } munin::register { $::fqdn: - 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'], - export_tag => $munin::client::export_tag, + host => $host, + port => $munin::client::port, + use_ssh => $munin::client::use_ssh, + description => $munin::client::description, + group => $munin::client::munin_group, + config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], + export_tag => $munin::client::export_tag, } include munin::plugins::base } -- cgit v1.2.3 From 27c9a5dbc2083dcc20d059008702dd3f75382bcc Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 10 Oct 2014 11:54:10 +0200 Subject: more linting and latest puppet-lint support --- manifests/client/base.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'manifests/client/base.pp') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index d35d742..6ed0f71 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -4,11 +4,11 @@ class munin::client::base inherits munin::client::params { ensure => installed } service { 'munin-node': - ensure => running, - enable => true, - hasstatus => true, - hasrestart => true, - require => Package[munin-node], + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, + require => Package[munin-node], } file {'/etc/munin': ensure => directory, @@ -36,7 +36,8 @@ class munin::client::base inherits munin::client::params { use_ssh => $munin::client::use_ssh, description => $munin::client::description, group => $munin::client::munin_group, - config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], + config => [ 'use_node_name yes', 'load.load.warning 5', + 'load.load.critical 10'], export_tag => $munin::client::export_tag, } include munin::plugins::base -- cgit v1.2.3