On Friday, August 16, 2013 7:47:28 PM UTC-5, Ellison Marks wrote:
>
> So, I've run into a puzzling situation. I recently started playing around 
> with the puppetlabs-apache module. Now, I generally use hiera_include to 
> get all my classes, and it seemed logical that I should include the apache 
> class at the webserver level of my hierarchy, and specific modules on a 
> per-host basis. So, at my webserver level I have, say:
>
> ---
> classes:
>   - apache
>   - apache::mod::ssl
>   - apache::mod::headers
>
>
> and on one of my nodes, I have:
>
> ---
> classes:
>   - apache::mod::wsgi
>   - apache::mod::perl
>   - apache::mod::passenger
>
> When I try a puppet run, the mod_passenger include fails, claiming it 
> can't find variables from apache::params. Now the weird part is, if i 
> comment out passenger, it works fine, even though mod_wsgi has a very 
> similar pp file, using many of the same variables. I sort of get the 
> feeling that I'm at the mercy of the parser here somehow, as when I put all 
> the classes together, like so:
>
> ---
> classes:
>   - apache
>   - apache::mod::ssl
>   - apache::mod::headers
>   - apache::mod::wsgi
>   - apache::mod::perl
>   - apache::mod::passenger
>
> It works fine.
>
> Any idea how I could work things all separate, like my first example?
>


It looks like class apache::mod::passenger is flawed.  It uses variables 
from apache::params for parameter defaults without inheriting from that 
class (or from any other).  This presents a parse-order dependency.

You should file a ticket.  Meanwhile, it should be easy enough to fix your 
local copy of the apache::mod::passenger class.  You could even combine the 
two by submitting a pull request along with your ticket.

If you don't want to modify the module, then you should ensure that class 
apache::mod::passenger always comes later in the Hiera class list than some 
class that does declare apache::params, such as class apache.


John

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to