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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to