Icinga / puppet-icinga2-legacy

(legacy) Puppet module for Icinga 2 (EOL)
GNU General Public License v2.0
55 stars 93 forks source link

update zone documentation. enpoints are no arrays, they are hashes now #194

Closed rwaffen closed 8 years ago

gunnarbeutner commented 8 years ago

The 'endpoints' attribute is actually not a dictionary. It's an array and apparently the Icinga 2 documentation incorrectly states that it's a dictionary.

rwaffen commented 8 years ago

Than why is there a validate_hash and create_resource in the code. I didn't get it to work with arrays.

manifests/object/zone.pp

  if $endpoints {
     validate_hash($endpoints)
     $_endpoints = keys($endpoints)

     create_resources('icinga2::object::endpoint', $endpoints)
}
dgoetz commented 8 years ago

Sorry, guys, you are talking apples and oranges.

In Icinga 2 the attribute endpoints of the zone object is an array, but in the puppet module it is a dictionary to provide additional attributes to also create the endpoint objects automatically.

rwaffen commented 8 years ago

oh okay, that's the point... was wondering how that would be an array in puppet when it is checked that it has to be a hash 😄

arioch commented 8 years ago

Excellent. 👍 Merged upstream.