Duncan Hill
2008-Jun-24 13:06 UTC
[Puppet Users] Spurious ''Only subclasses can override parameters '' ?
This is a bit like a question posted to the list on the 3rd of June, but as far as I can tell I''m not using includes, only inherits. snmp.pp class snmp { # nothing useful } class snmp::server inherits snmp { $base = ''servers'' case $architecture { i386: { puppet_file { "snmpd_conf": name => "/etc/snmp/snmpd.conf", base => $base, source => "etc/snmp/snmpd.conf", owner => root, group => root, mode => 600, require => [ Package["net-snmp"] ]; } } } } hp_managed.pp class hp_managed8 inherits snmp::server { File["snmpd_conf"] { group => "hpsmh" } } node.pp node "lhm-srv-app01" inherits generic-server { include hp_managed8 } # puppetd --test --noop --masterport 8150 notice: Ignoring cache err: Could not retrieve catalog: Only subclasses can override parameters at /etc/puppet/manifests/classes/hp_managed8.pp:53 on node lhm-srv-app01 warning: Not using cache on failed catalog So, hp_managed8 is a subclass of snmp::server, but defined in a wholly different file. What am I doing wrong? (0.24.4) --~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Ohad Levy
2008-Jun-24 13:35 UTC
[Puppet Users] Re: Spurious ''Only subclasses can override parameters '' ?
what is puppet_file? where is it being defined? did you try instead of file, Puppet_file["snmpd.conf"... Ohad On Tue, Jun 24, 2008 at 9:06 PM, Duncan Hill <bajandude@googlemail.com> wrote:> > This is a bit like a question posted to the list on the 3rd of June, > but as far as I can tell I''m not using includes, only inherits. > > snmp.pp > class snmp { > # nothing useful > } > class snmp::server inherits snmp { > $base = ''servers'' > case $architecture { > i386: { > puppet_file { > "snmpd_conf": > name => "/etc/snmp/snmpd.conf", > base => $base, > source => "etc/snmp/snmpd.conf", > owner => root, > group => root, > mode => 600, > require => [ Package["net-snmp"] ]; > } > } > } > } > > hp_managed.pp > class hp_managed8 inherits snmp::server { > File["snmpd_conf"] { group => "hpsmh" } > } > > node.pp > node "lhm-srv-app01" inherits generic-server { > include hp_managed8 > } > > # puppetd --test --noop --masterport 8150 > notice: Ignoring cache > err: Could not retrieve catalog: Only subclasses can override > parameters at /etc/puppet/manifests/classes/hp_managed8.pp:53 on node > lhm-srv-app01 > warning: Not using cache on failed catalog > > So, hp_managed8 is a subclass of snmp::server, but defined in a wholly > different file. What am I doing wrong? (0.24.4) > > > >--~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Duncan Hill
2008-Jun-24 13:48 UTC
[Puppet Users] Re: Spurious ''Only subclasses can override parameters '' ?
2008/6/24 Ohad Levy <ohadlevy@gmail.com>:> what is puppet_file? where is it being defined? > > did you try instead of file, Puppet_file["snmpd.conf"...puppet_file is an local wrapper to the File function, defining multiple sources. However, you have a point - I tend to equate the two (puppet_file just saves me a lot of typing), forgetting that Puppet sees them differently. That worked, thank you :) Been staring at it for 2 hours. --~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---