Hi,

it's a good question, with no clear answer.

There is the defined() function. Under some circumstances, it can be
used to do what you have in mind. Don't try this though!

The problem with this kind of conditional is that imposes parse order
dependency. The order can shift as your manifest (including modules)
evolves.

The clean approach is to define, in a central location, for each node
wether ssl support is managed. Ask us about hiera ;-)

HTH,
Felix

On 04/13/2013 06:44 PM, Martin Rio wrote:
> 1. class myssl {
> 2./    ... code that puts certificate files in place ..../
> 3.
> 4./    if package https is installed {/
> 5.          class {'apache::mod::ssl': }    <- enables Apache's mod_ssl
> 6.     }
> 7. }
> 
> In the module above, I'm setting up SSL certificates on a server, and
> I'd like to to enable Apache's mod_ssl *only if* the manifest requires
> the Apache package elsewhere. This is optional because some manifests
> may use another web server. Is there a way to express a conditional in
> line 4 that will test whether the httpd package is part of the manifest?
> 
> Thanks and in advance, and sorry for the newbie questions!

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
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