# Example: # smokeping::monitorhost { : # place => "local", # host => "host" # } define smokeping::monitorhost ( $place, $host ) { ## pas possible pour le moment parce que ce fichier se duplique... # file { "/etc/smokeping/config.d/Targets-$place": # ensure => "present", # content => "+ $place\nmenu = $place\ntitle = $host\n", # require => Package["smokeping"] # } file { "/etc/smokeping/config.d/Targets-$place-$host": ensure => "present", content => "++ $host\nmenu = $host\ntitle = $host\nhost = $host\n", require => Package["smokeping"] } line { $host : file => "/etc/smokeping/config", line => "@include /etc/smokeping/config.d/Targets-$place-$host", ensure => present, require => Package["smokeping"] } } class smokeping::server { package { "smokeping": ensure => installed } service { "smokeping": enable => true, ensure => running, subscribe => [ Package["smokeping"] ], } }