Rev | Line | |
---|
[176] | 1 | # Example: |
---|
[189] | 2 | # smokeping::monitorhost { <host>: |
---|
[176] | 3 | # place => "local", |
---|
| 4 | # host => "host" |
---|
| 5 | # } |
---|
| 6 | |
---|
[189] | 7 | define smokeping::monitorhost ( $place, $host ) { |
---|
[176] | 8 | |
---|
[189] | 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 | |
---|
[176] | 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 : |
---|
[189] | 23 | file => "/etc/smokeping/config", |
---|
[176] | 24 | line => "@include /etc/smokeping/config.d/Targets-$place-$host", |
---|
| 25 | ensure => present, |
---|
| 26 | require => Package["smokeping"] |
---|
| 27 | } |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | class 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.