source: trunk/puppet/manifests/classes/smokeping.pp @ 176

Last change on this file since 176 was 176, checked in by sebas, 15 years ago

modulo para activar servidor smokeping + host a monitorear

File size: 755 bytes
RevLine 
[176]1# Example:
2#    smokeping::activateclient { <host>:
3#       place => "local",
4#       host  => "host"
5#    }
6
7define smokeping::activateclient ( $place, $host ) {
8
9        file { "/etc/smokeping/config.d/Targets-$place-$host":
10        ensure => "present",
11        content => "++ $host\nmenu = $host\ntitle = $host\nhost = $host\n",
12        require => Package["smokeping"]
13        }
14
15        line { $host :
16        file => "/etc/smokeping/config.d/Targets",
17        line => "@include /etc/smokeping/config.d/Targets-$place-$host",
18        ensure => present,
19        require => Package["smokeping"]
20        }
21}
22
23class smokeping::server {
24        package { "smokeping": ensure => installed }
25
26        service { "smokeping":
27        enable => true,
28        ensure => running,
29        subscribe => [ Package["smokeping"] ],
30        }
31}
Note: See TracBrowser for help on using the repository browser.