summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduritong <peter.meier+github@immerda.ch>2013-03-18 07:35:57 -0700
committerduritong <peter.meier+github@immerda.ch>2013-03-18 07:35:57 -0700
commit8b33376684026516107b6331d2fbde38362b72ec (patch)
tree766227aa44bc8f70299ea60e0d9d9b02c44bc406
parentd3dae3c834c37f689af3d1b08bc0c1fd4762bd91 (diff)
parent3b10e0eb3fabb19cc0fa9d66f5a8379ae96aeb6f (diff)
Merge pull request #8 from oxilion/export_tag
Add support for specifying tags for exported resources
-rw-r--r--manifests/client.pp3
-rw-r--r--manifests/client/base.pp13
-rw-r--r--manifests/host.pp5
-rw-r--r--manifests/register.pp7
4 files changed, 16 insertions, 12 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index 6726836..2316bc9 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -9,7 +9,8 @@ class munin::client(
$port = '4949',
$use_ssh = false,
$manage_shorewall = false,
- $shorewall_collector_source = 'net'
+ $shorewall_collector_source = 'net',
+ $export_tag = 'munin'
) {
case $::operatingsystem {
openbsd: { include munin::client::openbsd }
diff --git a/manifests/client/base.pp b/manifests/client/base.pp
index 441198e..78398a9 100644
--- a/manifests/client/base.pp
+++ b/manifests/client/base.pp
@@ -15,13 +15,14 @@ class munin::client::base {
mode => 0644, owner => root, group => 0,
}
munin::register { $::fqdn:
- host => $munin::client::host ? {
- '*' => $::fqdn,
- default => $munin::client::host
+ host => $munin::client::host ? {
+ '*' => $::fqdn,
+ default => $munin::client::host
},
- port => $munin::client::port,
- use_ssh => $munin::client::use_ssh,
- config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'],
+ 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,
}
include munin::plugins::base
}
diff --git a/manifests/host.pp b/manifests/host.pp
index b828e35..05dcb5e 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -3,12 +3,13 @@
# See LICENSE for the full license granted to you.
class munin::host(
- $cgi_graphing = false
+ $cgi_graphing = false,
+ $export_tag = 'munin'
) {
package {"munin": ensure => installed, }
include concat::setup
- Concat::Fragment <<| tag == 'munin' |>>
+ Concat::Fragment <<| tag == $export_tag |>>
concat::fragment{'munin.conf.header':
target => '/etc/munin/munin.conf',
diff --git a/manifests/register.pp b/manifests/register.pp
index 6c154e5..309c322 100644
--- a/manifests/register.pp
+++ b/manifests/register.pp
@@ -3,15 +3,16 @@ define munin::register (
$port = '4949',
$use_ssh = false,
$description = 'absent',
- $config = []
+ $config = [],
+ $export_tag = 'munin'
)
{
$fhost = $name
$client_type = 'client'
@@concat::fragment{ "munin_client_${fhost}_${port}":
- target => '/etc/munin/munin.conf',
+ target => '/etc/munin/munin.conf',
content => template("munin/client.erb"),
- tag => 'munin',
+ tag => $export_tag,
}
}