The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #13537

Overriding class parameters doesn't actually pass new parameters.

Added by Marek Kroemeke about 4 years ago. Updated about 3 years ago.

Status:DuplicateStart date:03/30/2012
Priority:NormalDue date:
Assignee:Nigel Kersten% Done:


Target version:-
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:



OS: RHEL 5.8, RHEL 5.7 Puppet: 2.7.11, 2.7.12*

I’m not 100% certain if this a design decision or simply a bug – but because puppet doesn’t complain about the syntax I suspect this is a bug.

 class nodetype::foo {
  class { network:
    default_gateway => '',
    routes => {
      multicast   => {
        comment => 'multicast over eth0',
        address => '',
        netmask => '',

class nodetype::foo::egg inherits nodetype::foo {
  Class["network"] {
    default_gateway => '',

This does not work – i.e. parameter passes is still

Best regards, Marek

  • daysman@#puppet

inherit-param-class.pp (456 Bytes) Anonymous, 04/05/2012 12:36 pm


#1 Updated by Anonymous about 4 years ago

  • File inherit-param-class.pp added
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Nigel Kersten

It seems that the documented feature of class inheritance (see works for basic resource types, but fails for parameterized classes. The attatched manifest shows this problem. The Notify inside “foo” has a different message because of bar inheriting and overriding the message parameter, but the same thing doesn’t seem to work for overriding the parameter to the parameterized class “params” used by “foo”.

Marek, what you are trying to do would probably be better achieved by making nodetype::foo parameterized instead of trying to use inheritance and overriding resource settings.

#2 Updated by Nigel Kersten about 4 years ago

  • Status changed from Needs Decision to Needs More Information

That’s my suspicion too.

In many ways class inheritance was there to fill in some of the gaps that parameterized classes provided later.

Before we prioritized this, I’d like to see some more details from users on where class inheritance for parameterized classes provides functionality that can’t be more easily provided using parameterized classes directly.

#3 Updated by Dustin Mitchell over 3 years ago

Reduced test case:

class takes_param($param=purple) {
        notify {
                "param is $param": ;

class parent {
        class {
                        param => true;

class child inherits parent {
        Class['takes_param'] { param => false }

include child

This is useful to me because my toplevel classes need to be something I could specify from an ENC, which means only node-scope variables (yuck) and class names.

#4 Updated by Dustin Mitchell over 3 years ago

At the very least, this should give an error, rather than just ignoring the arguments to Class[‘takes_param’]. In fact, you can pass whatever you want — { foo => bar } — without error.

#5 Updated by Paul Canham over 3 years ago

This looks like a duplicate of 5517

#6 Updated by Dustin Mitchell about 3 years ago

  • Status changed from Needs More Information to Duplicate

Also available in: Atom PDF