summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2014-12-13 11:21:09 -0500
committerGabriel Filion <gabster@lelutin.ca>2014-12-13 11:21:09 -0500
commitacfaa47dbdb07805cb07eb72f552d0e9b03ba1c9 (patch)
tree861622211d28234516e4324de12624ef812b8a9e /manifests/init.pp
parent48272434978f95c70e34aebe9ce188157f8f935e (diff)
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.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp38
1 files changed, 36 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 54b489b..bbabf2e 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -12,5 +12,39 @@
# General Public License version 3 as published by
# the Free Software Foundation.
#
-# the port is a parameter so vservers can share
-# IP addresses and still be happy
+# Parameters:
+# $is_server - determines whether or not to install munin server. munin-node is
+# required for the server so it is always installed.
+# $export_tag - tag exported resources so that only the server targeted by that
+# tag will collect them. This can let you install multiple munin
+# servers.
+#
+# Client-specific parameters:
+# $allow, $host, $host_name, $port, $use_ssh, $manage_shorewall,
+# $shorewall_collector_source, $description, $munin_group
+#
+# Server-specific parameters:
+# $cgi_graphing, cgi_owner
+
+class munin (
+ $is_server = false,
+ $export_tag = 'munin',
+ $allow = [ '127.0.0.1' ],
+ $host = '*',
+ $host_name = $::fqdn,
+ $port = '4949',
+ $use_ssh = false,
+ $manage_shorewall = false,
+ $shorewall_collector_source = 'net',
+ $description = 'absent',
+ $munin_group = 'absent',
+ $cgi_graphing = false,
+ $cgi_owner = 'os_default',
+) {
+
+ include munin::client
+
+ if $is_server {
+ include munin::host
+ }
+}