diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2014-12-13 09:34:56 -0500 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2014-12-13 10:21:25 -0500 |
commit | 48272434978f95c70e34aebe9ce188157f8f935e (patch) | |
tree | 8c940d891cbcba026d56cf8ed2935361debc44fd /manifests/client/base.pp | |
parent | 7e03247a9e219fe8e57d544957eb06e305e69fc1 (diff) | |
parent | 27c9a5dbc2083dcc20d059008702dd3f75382bcc (diff) |
Merge remote-tracking branch 'immerda/master' into merge_immerda
Conflicts:
manifests/plugins/interfaces.pp
$real_ifs was changed on master and we'd like to keep that change
$ifs was changed to use the prefix() function and we'd like to keep that
change.
Diffstat (limited to 'manifests/client/base.pp')
-rw-r--r-- | manifests/client/base.pp | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 78398a9..6ed0f71 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,28 +1,44 @@ -class munin::client::base { +# Install a basic munin client +class munin::client::base inherits munin::client::params { + package { 'munin-node': + ensure => installed + } service { 'munin-node': - ensure => running, - enable => true, - hasstatus => true, + ensure => running, + enable => true, + hasstatus => true, hasrestart => true, + require => Package[munin-node], } file {'/etc/munin': ensure => directory, - mode => 0755, owner => root, group => 0; + mode => '0755', + owner => root, + group => 0, } file {'/etc/munin/munin-node.conf': - content => template("munin/munin-node.conf.${::operatingsystem}"), - notify => Service['munin-node'], - mode => 0644, owner => root, group => 0, + content => template("${module_name}/munin-node.conf.erb"), + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package['munin-node'], + notify => Service['munin-node'], + mode => '0644', + owner => root, + group => 0, + } + $host = $munin::client::host ? { + '*' => $::fqdn, + default => $munin::client::host } munin::register { $::fqdn: - 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'], - export_tag => $munin::client::export_tag, + host => $host, + port => $munin::client::port, + use_ssh => $munin::client::use_ssh, + description => $munin::client::description, + group => $munin::client::munin_group, + config => [ 'use_node_name yes', 'load.load.warning 5', + 'load.load.critical 10'], + export_tag => $munin::client::export_tag, } include munin::plugins::base } |