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.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 2316bc9..4d70cac 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -22,8 +22,8 @@ class munin::client( } if $munin::client::manage_shorewall { class{'shorewall::rules::munin': - munin_port => $port, - munin_collector => delete($allow,'127.0.0.1'), + munin_port => $port, + munin_collector => delete($allow,'127.0.0.1'), collector_source => $shorewall_collector_source, } } -- cgit v1.2.3 From 26224742940b06335bca3cb8f5e09d0c0a5cabef Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Sun, 13 Oct 2013 20:24:20 +0200 Subject: Class[] -> Class[] requirement replaced by an anchor --- manifests/client.pp | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 4d70cac..c33ec0d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -12,13 +12,39 @@ class munin::client( $shorewall_collector_source = 'net', $export_tag = 'munin' ) { + anchor { 'munin::client::installed': } + case $::operatingsystem { - openbsd: { include munin::client::openbsd } - darwin: { include munin::client::darwin } - debian,ubuntu: { include munin::client::debian } - gentoo: { include munin::client::gentoo } - centos: { include munin::client::package } - default: { include munin::client::base } + openbsd: { + class { 'munin::client::openbsd': + before => Anchor['munin::client::installed'] + } + } + darwin: { + class { 'munin::client::darwin': + before => Anchor['munin::client::installed'] + } + } + debian,ubuntu: { + class { 'munin::client::debian': + before => Anchor['munin::client::installed'] + } + } + gentoo: { + class { 'munin::client::gentoo': + before => Anchor['munin::client::installed'] + } + } + centos: { + class { 'munin::client::package': + before => Anchor['munin::client::installed'] + } + } + default: { + class { 'munin::client::base': + before => Anchor['munin::client::installed'] + } + } } if $munin::client::manage_shorewall { class{'shorewall::rules::munin': -- cgit v1.2.3 From 6856c8bb3f11073a47ab705d0e2012a0c90acae3 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 3 Nov 2013 17:18:40 +0100 Subject: some doc --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index c33ec0d..f91436f 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -1,8 +1,8 @@ -# client.pp - configure a munin node # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. # Adapted and improved by admin(at)immerda.ch +# configure a munin node class munin::client( $allow = [ '127.0.0.1' ], $host = '*', -- 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.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index f91436f..b7cd5d4 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -36,7 +36,7 @@ class munin::client( } } centos: { - class { 'munin::client::package': + class { 'munin::client::base': before => Anchor['munin::client::installed'] } } -- cgit v1.2.3 From ad37140f6123c0e85cfbeb23dee5b3ea3c324701 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 3 Nov 2013 17:55:54 +0100 Subject: remove anchor dependency - fixed #26 given that all os are using package installation now, we can replace the anchor with the package dependency. It also caused a dependency cycle as the anchor was for the whole class and not only the package installation. --- manifests/client.pp | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index b7cd5d4..2d4c82b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -12,39 +12,14 @@ class munin::client( $shorewall_collector_source = 'net', $export_tag = 'munin' ) { - anchor { 'munin::client::installed': } case $::operatingsystem { - openbsd: { - class { 'munin::client::openbsd': - before => Anchor['munin::client::installed'] - } - } - darwin: { - class { 'munin::client::darwin': - before => Anchor['munin::client::installed'] - } - } - debian,ubuntu: { - class { 'munin::client::debian': - before => Anchor['munin::client::installed'] - } - } - gentoo: { - class { 'munin::client::gentoo': - before => Anchor['munin::client::installed'] - } - } - centos: { - class { 'munin::client::base': - before => Anchor['munin::client::installed'] - } - } - default: { - class { 'munin::client::base': - before => Anchor['munin::client::installed'] - } - } + openbsd: { include munin::client::openbsd } + darwin: { include munin::client::darwin } + debian,ubuntu: { include munin::client::debian } + gentoo: { include munin::client::gentoo } + centos: { include munin::client::base } + default: { include munin::client::base } } if $munin::client::manage_shorewall { class{'shorewall::rules::munin': -- 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.pp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 2d4c82b..6614709 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -4,13 +4,15 @@ # configure a munin node class munin::client( - $allow = [ '127.0.0.1' ], - $host = '*', - $port = '4949', - $use_ssh = false, - $manage_shorewall = false, + $allow = [ '127.0.0.1' ], + $host = '*', + $port = '4949', + $use_ssh = false, + $manage_shorewall = false, $shorewall_collector_source = 'net', - $export_tag = 'munin' + $export_tag = 'munin', + $description = 'absent', + $munin_group = 'absent', ) { case $::operatingsystem { -- cgit v1.2.3 From d09774c635ea72932727d6724ee847942ddafb77 Mon Sep 17 00:00:00 2001 From: antonio Date: Wed, 9 Apr 2014 15:45:37 +0200 Subject: Configurable host_name variable --- manifests/client.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 6614709..7a96233 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -6,6 +6,7 @@ class munin::client( $allow = [ '127.0.0.1' ], $host = '*', + $host_name = '::fqdn', $port = '4949', $use_ssh = false, $manage_shorewall = false, -- cgit v1.2.3 From 29919e02a8b3f27d9d516be586e92704b806a48e Mon Sep 17 00:00:00 2001 From: antonio Date: Thu, 12 Jun 2014 00:41:18 +0200 Subject: changed host_name default to ::fqdn --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 7a96233..724ff05 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -6,7 +6,7 @@ class munin::client( $allow = [ '127.0.0.1' ], $host = '*', - $host_name = '::fqdn', + $host_name = $::fqdn, $port = '4949', $use_ssh = false, $manage_shorewall = false, -- cgit v1.2.3 From acfaa47dbdb07805cb07eb72f552d0e9b03ba1c9 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 13 Dec 2014 11:21:09 -0500 Subject: create a single entry point to the module The current state of the module makes it impossible to install a munin server with munin::host, since it depends on resources in munin::client (because of the plugins it installs). Even if we include the munin::client class "just before" munin::host, puppet thinks there are dependency issues. By moving arguments to a single point of entry we can then include all necessary items and puppet will find the needed resources correctly. --- manifests/client.pp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 724ff05..aca899a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -3,18 +3,7 @@ # Adapted and improved by admin(at)immerda.ch # configure a munin node -class munin::client( - $allow = [ '127.0.0.1' ], - $host = '*', - $host_name = $::fqdn, - $port = '4949', - $use_ssh = false, - $manage_shorewall = false, - $shorewall_collector_source = 'net', - $export_tag = 'munin', - $description = 'absent', - $munin_group = 'absent', -) { +class munin::client { case $::operatingsystem { openbsd: { include munin::client::openbsd } @@ -24,11 +13,11 @@ class munin::client( centos: { include munin::client::base } default: { include munin::client::base } } - if $munin::client::manage_shorewall { + if $munin::manage_shorewall { class{'shorewall::rules::munin': - munin_port => $port, - munin_collector => delete($allow,'127.0.0.1'), - collector_source => $shorewall_collector_source, + munin_port => $munin::port, + munin_collector => delete($munin::allow,'127.0.0.1'), + collector_source => $munin::shorewall_collector_source, } } } -- cgit v1.2.3