Urr, I spoke too soon. It's working on some servers, not others. For instance on another I get:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Pe_compliance::Agent] is already declared; cannot redeclare at /opt/puppet/share/puppet/modules/pe_compliance/manifests/init.pp:15 on node blah I've re-built the server to try and eliminate any catalog caching issues (not that I've ever seen any), no luck. On Friday, 1 June 2012 15:43:56 UTC+1, Rufus McDufus wrote: > > OK, I'm officially going crazy! I cut and paste the code I put in my first > post - everything works perfectly now... > > I have done some pretty major code re-organisation so it's likely I may > have fixed something along the way which caused spurious problems. I can't > reproduce it any more :( > > Thanks for your help though! > > > > On Friday, 1 June 2012 15:09:15 UTC+1, jcbollinger wrote: >> >> >> >> On Jun 1, 5:34 am, Rufus McDufus <r...@bamalam.com> wrote: >> > Hi folks - I'm trying what should be a simple task but I'm having a >> case of >> > brain fade! In puppet enterprise in the pe_compliance module, a >> cronjob >> > gets added by class pe_compliance::agent: >> > >> > % cat /opt/puppet/share/puppet/modules/pe_compliance/manifests/agent.pp >> > class pe_compliance::agent { >> > cron { 'report_baseline': >> > command => >> > 'PATH=/opt/puppet/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin >> > /opt/puppet/bin/puppet inspect', >> > hour => '20', >> > minute => '0', >> > } >> > >> > } >> > >> > I want to modify this cronjob to redirect stdout to /dev/null but I >> don't >> > want to edit this file directly as I don't want to modify core modules. >> > Everything I try to try and override results in a duplicate definition >> of >> > Pe_compliance::agent or 'Only subclasses can override parameters'. For >> > instance if I try: >> > >> > class pe_compliance::agent::cronmodify inherits >> ::pe_compliance::agent { >> > Cron['report_baseline'] { >> > command => >> > 'PATH=/opt/puppet/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin >> > /opt/puppet/bin/puppet inspect >/dev/null' >> > } >> > } >> > include pe_compliance::agent::cronmodify >> > >> > I get: >> > Error 400 on SERVER: Duplicate declaration: >> Class[Pe_compliance::Agent] is >> > already declared; cannot redeclare at >> > /opt/puppet/share/puppet/modules/pe_compliance/manifests/init.pp:15 >> > >> > Is there an easy way of overriding this parameter? >> >> >> What you wrote above looks like it ought to work. Perhaps Puppet is >> handling the "::pe_compliance::agent" inconsistently. Does it work if >> instead you write >> >> class pe_compliance::agent::cronmodify inherits pe_compliance::agent { >> [...] >> >> ? >> >> If it does, then I'm sure Puppetlabs would appreciate an official bug >> report. Given that Puppet accepts "inherits ::pe_compliance::agent" >> in the first place, it should recognize that it refers to the same >> class as "pe_compliance::agent", and therefore engage its machinery >> that allows super- and subclasses to both be declared on the same >> node. >> >> >> John >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/95w1y2m3bAoJ. 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.