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?

Thanks,

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