Allow installing packages 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 install the corresponding packages 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 packages
# OR
class { packages:
}
site.pp
:
lookup('classes', { merge => unique, default_value => [] }).include
hiera.yaml
:
---
classes:
- packages
You can change the merge behavior of the lookup, by default, no merge behavior is set and the one set in Hiera is used:
packages::merge_behavior: deep
Or:
class { packages:
merge_behavior => deep,
}
Once you included the class, you can declare the resources like this:
packages:
htop:
ensure: latest
requests:
provider: pip3
man:
vim:
You can check the examples/hiera.yaml for a real world examples
Initial Release