Project

General

Profile

Actions

Bug #17435

open

hooks: allow hooks to define hiera values

Added by Patrick Schönfeld almost 8 years ago. Updated almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When hooking into a kafo-based installer (e.g. foreman-installer) it would be nice, if I would be able to define parameters for puppet classes not directly included as "module". That would allow to change class paramters that are included as part of an installation but not directly parametrized as 'module'.

I had a possible use case, when I wanted to change postgresql listen_addresses to include a certain interface address, which requires to set the corresponding parameter on postgresql::server which is included by foreman::database::postgresql.

I'd be willing to work on this and thought about this implementation:

- Add a new attribute custom_hiera_values to Kafo::Configuration
- Extend HieraConfigure
- include a new hierarchy layer kafo_custom before kafo_answers
- let write_configs write that file with the contents of kafo.config.custom_hiera_values
- Add methods to kafo/hook_context store_custom_hiera_value and get_custom_hiera_value

Seems straightforward and is improving flexibility. What do you think? Anything I miss, any comments about the possible implementation?

Actions

Also available in: Atom PDF