On Tuesday, October 2, 2012 11:47:43 AM UTC-5, ureal frank wrote:
>
>  Hi, 
>
> I have a service /etc/init.d/a that spawns multiple daemons b and c.
>
> This manifest does not make much sense to me but… any tip?
>
> service { 'a': 
> ensure => running, 
> pattern => ["/usr/local/bin/b", "/usr/local/bin/c"],
> }
>
>

As far as I know, the 'pattern' parameter understands only a single 
pattern.  What you have written probably won't do what you want.

 

> or should I test them individually?
>
> service { 'a': 
> ensure => running, 
> pattern => "/usr/local/bin/b",
> }
> service { 'a': 
> ensure => running, 
> pattern => "/usr/local/bin/c",
> }
>
>
No, you cannot declare Service['a'] (or any other resource) twice.

Your best bet would be to make the service control script /etc/init.d/a 
respond to the "status" command in an appropriate way (ideally as specified 
by the LSB; see 
http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html),
 
and leave off the 'pattern' parameter in the service declaration.  If you 
are running a Puppet version older than 2.7.0 then you will also need to 
add "hasstatus => true" to the service parameters.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NpAfZV6TrIkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to