Difference between revisions of "Hierahandson"
From Gridkaschool
(Created page with "This is our hiera hierarchy: :hierarchy: environments/%{::environment}/hieradata/%{::certname} environments/%{::environment}/hieradata/%{::role} environments/%{::envi…") |
|||
Line 1: | Line 1: | ||
This is our hiera hierarchy: |
This is our hiera hierarchy: |
||
− | :hierarchy: |
||
environments/%{::environment}/hieradata/%{::certname} |
environments/%{::environment}/hieradata/%{::certname} |
||
environments/%{::environment}/hieradata/%{::role} |
environments/%{::environment}/hieradata/%{::role} |
Revision as of 12:01, 4 September 2014
This is our hiera hierarchy:
environments/%{::environment}/hieradata/%{::certname} environments/%{::environment}/hieradata/%{::role} environments/%{::environment}/hieradata/%{::osfamily} environments/%{::environment}/hieradata/common hieradata/common
- Enhance the apache module with hiera
- In the root of your environment, "mkdir hieradata"
- cd hieradata
- touch $(hostname).desy.de.yaml
- touch web.yaml data.yaml compute.yaml
- touch RedHat.yaml
- touch common.yaml
- convert params to hiera() calls
- you will need to define the key in one of the yaml files that will apply to your machine. Note that only one of web/data/compute will apply to you! You can add different values to different parts of the hierarchy and see which apply
- convert the direct heira() calls to automatic lookups. Remember that if a class is called "foo" and it has a parameter "$bar" then you need a hiera key foo::bar
- In your environment, using