Issue #1771 has been updated by Nigel Kersten.

Status changed from Needs Decision to Rejected

Rejecting due to incomplete design and to help reduce our outstanding ticket 
burden.

With an improved design proposal and/or significant desire from the user base 
that status could change.
----------------------------------------
Feature #1771: Resources that are unique across a site
https://projects.puppetlabs.com/issues/1771

Author: John Ferlito
Status: Rejected
Priority: Normal
Assignee: Nigel Kersten
Category: language
Target version: 
Affected Puppet version: 0.24.6
Keywords: export virtual resource nagios
Branch: 


So let's say I have an ssh class like so, included by all nodes

<pre>
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'
#    }    

}
</pre>

then a nagios class included only by my nagios host

<pre>
class nagios {
  Nagios_service <<||>>
  Nagios_command <<||>>
}
</pre>

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

<pre>
@@@nagios_command {
    'check_ssh':
        command_line => 'check_ssh -H $HOSTADDRESS'
}
</pre>

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://projects.puppetlabs.com/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.

Reply via email to