Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _data/nav/openvox_8x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
link: "designing_convenient_roles.html"
- text: Hiera
items:
- text: Hiera
- text: About Hiera
link: "hiera_intro.html"
- text: Interactive Hiera Demo
link: "hiera_demo.html"
Expand Down
2 changes: 1 addition & 1 deletion docs/_openvox_8x/hiera_config_yaml_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This version of Puppet supports three formats for hiera.yaml --- you can use any

## Important: version 3 is deprecated

Version 3 of hiera.yaml is deprecated, and we plan to remove support for it in Puppet 6.
Version 3 of hiera.yaml is deprecated and not recommended. OpenVox 8.x still supports it for backward compatibility, but you should use [version 5][v5] instead.

More importantly, it has some major problems:

Expand Down
2 changes: 1 addition & 1 deletion docs/_openvox_8x/hiera_config_yaml_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Hiera's config file is called hiera.yaml. It configures the [hierarchy][] for a given [layer][layers] of data.

This version of Puppet supports three formats for hiera.yaml --- you can use any of them, although v4 and [v3][] are deprecated. This page is about version 4, a transitional format used in Hiera 5's experimental predecessor (Puppet lookup).

Check failure on line 14 in docs/_openvox_8x/hiera_config_yaml_4.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length

docs/_openvox_8x/hiera_config_yaml_4.md:14:211 MD013/line-length Line length [Expected: 210; Actual: 240] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md


Format | Allowed in | Description
Expand All @@ -20,9 +20,9 @@
v4 | Environment and module layers | Deprecated. A transitional format, used in the rough draft of Hiera 5 (when we were calling it "Puppet lookup"). Doesn't support custom backends.
[v3][] | Global layer | Deprecated. The classic version of hiera.yaml, which has some problems.

## Important: version 4 is deprecated.

Check failure on line 23 in docs/_openvox_8x/hiera_config_yaml_4.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Trailing punctuation in heading

docs/_openvox_8x/hiera_config_yaml_4.md:23:38 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: '.'] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md026.md

Version 4 of hiera.yaml is deprecated, and we plan to remove support for it in Puppet 6.
Version 4 of hiera.yaml is deprecated and not recommended. OpenVox 8.x still supports it for backward compatibility, but you should use [version 5][v5] instead.

More importantly, version 4 can't use some of Hiera 5's best new features, like custom backends.

Expand Down Expand Up @@ -67,14 +67,14 @@

* `name` --- Required. An arbitrary human-readable name, used for debugging and for `puppet lookup --explain`.

This is also used as the default `path` if you don't specify any paths. (If the name interpolates variables, Hiera will interpolate when finding data files but leave it uninterpolated when reporting the level's name.)

Check failure on line 70 in docs/_openvox_8x/hiera_config_yaml_4.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length

docs/_openvox_8x/hiera_config_yaml_4.md:70:211 MD013/line-length Line length [Expected: 210; Actual: 221] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md
* `backend` --- Required. Which backend to use. Currently only `yaml` and `json` are supported.
* `path` --- Optional; mutually exclusive with `paths`. The path to a data file. Can interpolate variables, to use different files depending on a node's facts.
* `paths` --- Optional; mutually exclusive with `path`. An array of paths to data files, which can interpolate variables. This acts like multiple hierarchy levels, and is shorthand for writing consecutive levels that use the same backend and datadir.

Check failure on line 73 in docs/_openvox_8x/hiera_config_yaml_4.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length

docs/_openvox_8x/hiera_config_yaml_4.md:73:211 MD013/line-length Line length [Expected: 210; Actual: 250] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md
* `datadir` --- Optional. A one-off datadir to use instead of the default one specified at top level.

## Changes to version 4 for Hiera 5

In the experimental Puppet lookup, you had to use a setting to enable Hiera: for environments you had to set `environment_data_provider = hiera` in environment.conf or puppet.conf, and for modules you had to set `"data_provider":"hiera"` in metadata.json.

Check failure on line 78 in docs/_openvox_8x/hiera_config_yaml_4.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length

docs/_openvox_8x/hiera_config_yaml_4.md:78:211 MD013/line-length Line length [Expected: 210; Actual: 255] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md

That's no longer necessary. As of Puppet 4.9, Puppet automatically enables Hiera for a module or environment if a hiera.yaml file is present. This works for both v4 and v5 hiera.yaml files.
2 changes: 2 additions & 0 deletions docs/_openvox_8x/hiera_migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
[custom_backend_system]: ./hiera_custom_backends.html
[functions_puppet]: ./lang_write_functions_in_puppet.html

> **Note:** Hiera 5 has been the default since Puppet 5 (2017), so most OpenVox 8.x users already use it and do not need this guide. It remains here for the rare case of migrating very old Hiera 3 data.

Upgrading to Hiera 5 offers some major advantages. A real environment data layer means changes to your hierarchy are now routine and testable,
using multiple backends in your hierarchy is easier and you can make a custom backend.

Expand All @@ -34,7 +36,7 @@

Task | Benefit
---- | -------
Enable the environment layer, by giving each environment its own `hiera.yaml` file. | Future hierarchy changes are cheap and testable. The legacy `hiera()`, `hiera_array()`, etc. functions gain full Hiera 5 powers in any migrated environment, only if there is a `hiera.yaml` in the environment root.

Check failure on line 39 in docs/_openvox_8x/hiera_migrate.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length

docs/_openvox_8x/hiera_migrate.md:39:211 MD013/line-length Line length [Expected: 210; Actual: 299] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md
Convert your global `hiera.yaml` file to the version 5 format. | You can use new Hiera 5 backends at the global layer.
Convert any experimental (version 4) `hiera.yaml` files to version 5. | Future-proof any environments or modules where you used the experimental version of Puppet lookup.
In Puppet code, replace `hiera()`/`hiera_array()`/etc. with `lookup()`. | Future-proof your Puppet code.
Expand Down
Loading