Hi,

I am trying to manage the puppet.conf file, but both my classes
'puppet' and 'puppet::master' need to manage it. Basically, the class
'puppet::master' should be able to override the resource, which could
be done by inheritance.
My problem is that my class 'puppet' is a parameterized class:

    class puppet ( $puppetmaster_fqdn ) {
        file { '/etc/puppet/puppet.conf':
            content => template('puppet/puppet.conf.erb'),
        }
        # (...)
    }

and so, i don't find any syntax to inherit from it:

    class puppet::master ( $with_dashboard          = 'yes',
                           $with_cloud_provisioner  = 'no'
                         ) inherits puppet {
        # (...)
    }

fails with

    err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Must pass puppetmaster_fqdn to Class[Puppet] at /etc/puppet/
modules/puppet/manifests/puppet.pp:1 on node (...)

I tried different ways to declare my class 'puppet::master', but i do
not find the right syntax, it always fails

    class puppet::master ( $puppetmaster_fqdn       = 'something',
                           $with_dashboard          = 'yes',
                           $with_cloud_provisioner  = 'no'
                         ) inherits puppet {
        # (...)
    }

    class puppet::master ( $with_dashboard          = 'yes',
                           $with_cloud_provisioner  = 'no'
                         ) inherits puppet( puppetmaster_fqdn =>
'something' ) {
        # (...)
    }

What is the good syntax for that ?


Note also that i tried to work around the problem by using a virtual
resource for my File['/etc/puppet.conf'], and realize it in both
classes (without inheritance) but it did not end up as i wished. It
worked, but the templated file missed the content which should have
been triggered by the variables $with_dashboard from class
'puppet::master'

-- 
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.

Reply via email to