Issue #1771 has been reported by johnf.
----------------------------------------
Feature #1771: Would be able to export something multiple times but only have
it exported once
http://projects.reductivelabs.com/issues/show/1771
Author: johnf
Status: Unreviewed
Priority: Normal
Assigned to:
Category: language
Target version:
Complexity: Medium
Affected version: 0.24.6
Keywords: export virtual resource nagios
So let's say I have an ssh class like so, included by all nodes
class ssh {
package {
ssh:
ensure: present
}
@@nagios_service {
"ssh_${fqdn}":
service_description => 'SSH'
command_name => 'check_ssh',
host_name => $fqdn
}
# This bit doesn't work
# @@nagios_command {
# 'check_ssh':
# command_line => 'check_ssh -H $HOSTADDRESS'
# }
}
then a nagios class included only by my nagios host
class nagios {
Nagios_service <<||>>
Nagios_command <<||>>
}
Now all the services get collected which is fine since they all have different
names and you want multiple entries one per host.
For the command however you only want one copy to exist since the command
should only be created once. But it's nice to be able to include it in the ssh
class so that everything is in the one place.
Current work arounds are
a) Surround it with an if defined(nagios_host) and make sure the nagios_host
class is defined on your nagios node before anything else gets called
b) Have a separate class with all the commands
I'm proposing that we create a new type of exported resource something like
@@@nagios_command {
'check_ssh':
command_line => 'check_ssh -H $HOSTADDRESS'
}
When collected only one instantiation of it would be presented for each name.
Putting to resources in the config with the same name but different parameters
would constitute an error.
I'm prepared to implement this if anyone else thinks it's a good idea.
----------------------------------------
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---