Skip to content
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.

[dev.icinga.com #11326] Create vars += config entry #345

Open
icinga-migration opened this issue Mar 7, 2016 · 2 comments
Open

[dev.icinga.com #11326] Create vars += config entry #345

icinga-migration opened this issue Mar 7, 2016 · 2 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11326

Created by pregopresto on 2016-03-07 21:46:58 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-03-12 22:19:19 +00:00 (in Redmine)


After successful implementation of #9107 I can not see how to create a vars += config entry using the puppet module anymore. Can this be implemented again?

@icinga-migration
Copy link
Author

Updated by pregopresto on 2016-03-07 22:18:09 +00:00

Note: I achieved this with modifying the apply_service template as follows:

  <%- if @vars.empty? != true -%>
  <%- if @vars.is_a?(Hash) -%>
  vars += <%= scope.function_icinga2_config_value([@vars]) %>
  <%- else -%>
  vars += <%= @vars %>
  <%- end -%>
  <%- end -%>

and I removed the validate_hash($vars) from the apply_service.pp but there must be prettier ways...

@icinga-migration
Copy link
Author

Updated by pregopresto on 2016-03-12 22:19:19 +00:00

same for users and user_group entries at apply_notification_to_*, just Array instead of Hash and not += but = but the change should be the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant