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/host.pp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'manifests/host.pp') diff --git a/manifests/host.pp b/manifests/host.pp index 0e5fb01..9831052 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -2,11 +2,8 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -class munin::host( - $cgi_graphing = false, - $cgi_owner = 'os_default', - $export_tag = 'munin' -) { +class munin::host { + package {'munin': ensure => installed, } Concat::Fragment <<| tag == $export_tag |>> @@ -31,9 +28,9 @@ class munin::host( include munin::plugins::muninhost - if $munin::host::cgi_graphing { + if $munin::cgi_graphing { class {'munin::host::cgi': - owner => $cgi_owner, + owner => $munin::cgi_owner, } } @@ -44,7 +41,7 @@ class munin::host( user => 'root', } - if $munin::host::manage_shorewall { + if $munin::manage_shorewall { include shorewall::rules::out::munin } } -- cgit v1.2.3