Hi,

that's actually a sound implementation.

Try this for debugging:

$comma_separated_list = inline_template("
<%= scope.lookupvar("::monit::services") * ', ' %>")

notify { "Services list: $comma_separated_list": }

Inside a class, not inside the defined type.

Cheers,
Felix

On 02/25/2013 03:52 PM, eduardo wrote:
>  Thanks felix,
>  I'm trying to do a validator for monit module.
>  I'm pretending down services are not controlled by monit, avoiding
> false alarm from monit service.
> 
>  I was work around with something like :
> 
> class monit($services) {
> 
>  include monit::checkservice,
>             monit::snippet
> 
>  monit::checkservice::checksrv{ $::monit::services : }
> 
> ------
> 
> class monit::checkservice {
>  define checksrv {
>    notify { "Checking service $name":}
>    service { $name:
>        noop => true,
>        hasstatus => false,
>        status => "/usr/local/bin/check_service.sh ${name}",
>    }
>  }
> }
> 
>  where $services is array of services from ENC.
>  But it have been unsuccessfully. I can see notifies messages foreach
> element from array but status script is not executed like i expected
> foreach item.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to