Allow creating resources directly from Hiera
- Description
- Usage - Configuration options and additional functionality
- Development - Guide for contributing to the module
With this module, you can create a Hash in your Hiera files to automatically create the corresponding ressouces in
Puppet via the create_resources
function.
You just need to include the class in your puppet code or in Hiera if you configured it :
include resources
# OR
class { resources:
}
site.pp
:
lookup('classes', { merge => unique, default_value => [] }).include
hiera.yaml
:
---
classes:
- resources
You can change the merge behavior of the lookup, by default, no merge behavior is set and the one set in Hiera is used:
resources::merge_behavior: deep
Or:
class { resources:
merge_behavior => deep,
}
Once you included the class, you can declare the resources like this:
resources:
resource_type:
resource_tittle:
arg1: 'string value'
arg2: 123
arg3: false
You can check the examples/hiera.yaml for a real world examples
Initial Release