We are trying to override a resource that was created with
''define'' but we are receiving the following error: Only
subclasses can override parameters at /etc/puppet/manifests/...
define nrpe::command(
$cmd,
$cmdname=$name,
$cwd=$nrpe::params::plugindir,
$ensure=''present''
) {
case $ensure {
absent,present: {}
default: {
fail("Invalid ensure value passed to Nrpe::Command[$name]")
}
}
file { "${nrpe::params::confd}/${cmdname}.cfg":
ensure => $ensure,
content => template(''nrpe/nrpe-command.cfg.erb''),
owner => root,
group => root,
mode => ''0644'',
require => Package[''nrpe''],
notify => Service[''nrpe''],
}
}
class base {
nrpe::command { ''anything'':
cmd => ''anything'',
}
}
class foo inerhits base {
Nrpe::Command[''anything''] {
cmd => ''something else'',
}
}
Is this even possible? If not, how would you work around this?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.