On 06/07/2012 11:30 AM, Andy Taylor wrote: > 1. Have Varnish/non-Varnish systems separated by environment and have > a conditional in the module which changes the listen port dependent on > the environment of the node;
What do you mean by "environment"? I think this should be a hiera based approach, which would seem all right to me. > 2. Use the 'defined' function (I've done a fair bit of reading on > this, and it looks like it isn't really recommended due to parse order > issues, and might even be removed in a future Puppet release) Exactly. Don't do this. > 3. Have the Varnish module create a resource of some sort and have the > Apache module check for its existence. But I assume I will run into > parse ordering issues with this, unless I put Varnish in a pre run > stage or similar. As long as your dependencies are simple, you can do a subclass based approach. Say your apache port is defined inside the apache::config class, you could devise something like this: class apache::config::alt_port($port) inherits apache::config { # override the contents of ports config file File["/etc/apache2/ports.conf"] { content => ... } } Then the varnish module includes this subclass class { "apache::config::alt_port": port => "8080" } Note that this will get you in trouble as soon as two separate instances want to fiddle with apache's port. A hiera based approach will most likely allow you to keep things much cleaner. Cheers, Felix -- 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.