On Tue, Jan 17, 2012 at 13:09, Christopher Wood
<christopher_w...@pobox.com> wrote:

> I definitely need some assistance in conceptualizing something.
>
> If I want to configure syslog-ng instead of rsyslog, or configure rsyslog 
> instead of sysklogd, the previous syslog daemon has to be stopped (and 
> disabled) before the new one starts. De-configuring the previous one works 
> just fine when the service (init script) exists on the system:
>
> $disable = ['rsyslog', 'syslog']
> service { $disable:
> enable => false,
> ensure => stopped,
> }
>
> But when the init script doesn't exist, I get something like this:
>
> Jan 17 15:05:44 dpuppet-01 puppet-agent[4011]: 
> (/Stage[main]/Sysklogd::Disable/Service[syslog]/ensure) change from running 
> to stopped failed: Could not find init script for 'syslog'
>
> How would I say "if it's there, disable it, if not, ignore it" in puppet DSL?

exec { "damn!": … }

Sadly, there isn't any way to express this in the DSL.  I suspect
there might be a feature request already, but I can't find one, so can
you file one?  This seems like a useful thing to do, without thinking
too deeply about it.

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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