You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried defining a Puppet class that includes resource-like declarations of classes ::icinga2 and ::icinga2::feature::api as well as resource type icinga2::object::zone almost literally like in the example you provide in section Agent of the documentation. Such a class would be convenient, because it could e.g. assign constant attribute values of for ::icinga2::feature::api that apply in my case (e.g. $accept_config = true) and calculate others (e.g. $bind_host = $ip).
However this fails: Puppet complains about a duplicate declaration of Icinga2::Feature::Api. I suspect this is because the definition of ::icinga2 states include prefix($features, 'icinga2::feature::'), i.e. it also declares ::icinga2::feature::api. Reversing the order between ::icinga2 and ::icinga2::feature::api also fails and is presumably prohibited by design: "you must include the icinga2 base class before using any icinga2 feature class".
I conclude from this that ::icinga2::feture::api must be declared include-like and that a resource-like declaration as in the provided example won't actually work. (This would be somewhat of a pity because I would have to provide all arguments verbatim in Hiera instead of having, say, three different classes that could serve for the master, for satellites, and agents more concisely. For many hosts that difference seems of concern.) Could you please clarify and perhaps change the manifest in the documentation, if applicable.
The text was updated successfully, but these errors were encountered:
the example https://github.com/icinga/puppet-icinga2#agent works like describe. You don't have to put the api feature to the features parameter (by default a list of mainlog, checker and notification).
@lbetz Thanks for your quick response! Yes, that makes good sense. I've now removed 'api' from features => ['api','checker','mainlog'] in my declaration of ::icinga2 and this makes a subsequent resource-like declaration of ::icinga2::feature::api possible exactly as described in the documentation.
I have tried defining a Puppet class that includes resource-like declarations of classes
::icinga2
and::icinga2::feature::api
as well as resource typeicinga2::object::zone
almost literally like in the example you provide in section Agent of the documentation. Such a class would be convenient, because it could e.g. assign constant attribute values of for::icinga2::feature::api
that apply in my case (e.g.$accept_config = true
) and calculate others (e.g.$bind_host = $ip
).However this fails: Puppet complains about a duplicate declaration of
Icinga2::Feature::Api
. I suspect this is because the definition of::icinga2
statesinclude prefix($features, 'icinga2::feature::')
, i.e. it also declares::icinga2::feature::api
. Reversing the order between::icinga2
and::icinga2::feature::api
also fails and is presumably prohibited by design: "you must include the icinga2 base class before using any icinga2 feature class".I conclude from this that
::icinga2::feture::api
must be declared include-like and that a resource-like declaration as in the provided example won't actually work. (This would be somewhat of a pity because I would have to provide all arguments verbatim in Hiera instead of having, say, three different classes that could serve for the master, for satellites, and agents more concisely. For many hosts that difference seems of concern.) Could you please clarify and perhaps change the manifest in the documentation, if applicable.The text was updated successfully, but these errors were encountered: