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

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

mejor descripcion de la clase

File size: 1011 bytes
Line 
1# Example:
2#    smokeping::monitorhost { <host>:
3#       place => "local",
4#       host  => "host"
5#    }
6
7define smokeping::monitorhost ( $place, $host ) {
8
9## pas possible pour le moment parce que ce fichier se duplique...
10#        file { "/etc/smokeping/config.d/Targets-$place":
11#        ensure => "present",
12#        content => "+ $place\nmenu = $place\ntitle = $host\n",
13#        require => Package["smokeping"]
14#        }
15
16        file { "/etc/smokeping/config.d/Targets-$place-$host":
17        ensure => "present",
18        content => "++ $host\nmenu = $host\ntitle = $host\nhost = $host\n",
19        require => Package["smokeping"]
20        }
21
22        line { $host :
23        file => "/etc/smokeping/config",
24        line => "@include /etc/smokeping/config.d/Targets-$place-$host",
25        ensure => present,
26        require => Package["smokeping"]
27        }
28}
29
30class smokeping::server {
31        package { "smokeping": ensure => installed }
32
33        service { "smokeping":
34        enable => true,
35        ensure => running,
36        subscribe => [ Package["smokeping"] ],
37        }
38}
Note: See TracBrowser for help on using the repository browser.