Is there a way to validate rsyslog and rsyslog5 if both not installed 
install rsyslog. 

Thanks,
Kumar

On Thursday, February 5, 2009 at 3:33:45 AM UTC-8, Peter Meier wrote:
>
> Hi
>
> > If this is not possible to achieve, then can the following be done with
> > puppet:
> >
> > Make sure that the rsyslog service is NOT running, regardless of the 
> package
> > is installed or not. Using the service resource type to stop/disable a
> > service gives an error if the init script doesn't exists. And I don't 
> wish
> > to run "ensure => absent" on the rsyslog package.
>
> I think the error on an absent init script should be fixed in 0.24.6.  
> at least for redhat based systems.
>
> > Please point me to the right documentation, or let me know if this is 
> not a
> > case for puppet.
> >
> > Btw, I see that the package resource type has some read-only parameters
> > (such as status). How can these be utilized in a puppet recipe? I can't 
> seem
> > to find any documentation on this.
>
> this would somehow sometimes be nice. However I don't think it's  
> possible and I event think that it isn't really needed and might lead  
> to many other problems, as maybe one should simply try to solve the  
> problem in a different way.
>
> >> Can I use puppet conditionals to check if a package is 
> installed/available
> >> for install, and act depending on the result?
> >> More precisely, this is what I'd like to do:
> >>
> >>    1. If package rsyslog is installed or available for install, then
> >>    include class that configures rsyslog
> >>    2. Else, configure the stock sysklogd
> >>
> >> I'm running puppet v0.24.4.
>
> you could write a custom fact which checks if rsyslog is avaiable to  
> install (which would mean that it might as well already be installed)  
> and then do a conditional include statement:
>
> if $rsyslog_avaiable {
>     include rsyslog
> } else {
>     include sysklogd
> }
>
> then the rsyslog class would look like:
>
> class rsyslog {
>     package{'rsyslog': ensure => installed }
>     [...rest of your stuff...]
> }
>
> cheers pete
>
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/22ce9047-89cd-476a-ac66-620a98b367db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to