On Jun 1, 9:44 pm, Ryan Bowlby <
rbowlb...@gmail.com> wrote:
> Thanks John, but it appears the ability to override a parent class
> parameter is limited to the resources DEFINED within that class.
Subclasses can override only parameters of resources *declared* by
their parent classes. And that's exactly what I suggested you try,
relying on Puppet's rather blurry distinction between classes and
resources. Specifically, class "base" declares the resource
Class['apache'], and I suggested that subclass "special" override one
of the parameters that base declares for that resource.
> In my
> base class I am merely declaring/instantiating the apache class and
> not defining it.
And that's the case for most resources. With any resource other than
a class, a subclass of the declaring class can override that
resource's parameters. Indeed, few resources (including classes) are
*defined* inside other classes at all, but that doesn't prevent their
parameters from being overridden.
> The overriding of parameters does not appear to work
> in that case.
But of course, that's the bottom line. I find it slightly surprising,
considering how much Puppetlabs has tried to make classes a special
variety of resources, but not shocking. I'm sorry it turned out to be
a red herring.
> I ended up just doing a few simple wrapper parameters as advised by
> Nick. I like the Hiera idea but it will have to wait since we have so
> much low hanging fruit to pick for the time being. Thanks everyone!
I'm glad you found something that works for you.
Cheers,
John