diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-02-19 00:31:43 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-02-19 00:31:43 -0200 |
commit | bf7260844723334534d1712bb3e89906018494c5 (patch) | |
tree | b18ca0ed3c1a74f4136f23a954b814d8be5e55da /manifests/munin.pp | |
parent | edf5be6911a7133682e4bc2a558f28ac670eed0a (diff) | |
download | puppet-nodo-bf7260844723334534d1712bb3e89906018494c5.tar.gz puppet-nodo-bf7260844723334534d1712bb3e89906018494c5.tar.bz2 |
Enhanced munin_node definition
Diffstat (limited to 'manifests/munin.pp')
-rw-r--r-- | manifests/munin.pp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/manifests/munin.pp b/manifests/munin.pp index 1795226..f0dac88 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -1,6 +1,19 @@ -# Define a munin node with custom port -define munin_node($id) { - # Use one port for each node - $munin_port = "49$id" +# Define a munin node +define munin_node($port = '4949') { + + case $global_munin_allow { + '': { fail("Please set \$global_munin_allow in your site config") } + } + + $munin_allow = $node_munin_allow ? { + '' => $global_munin_allow, + default => $node_munin_allow, + } + + $munin_port = $node_munin_port ? { + '' => $port + default => $node_munin_port, + } + include munin::client } |