We didn't preserve the data types from Heat metadata when writing hiera
files. We treated the metadata as raw YAML, unless it was multiline, in
which case we wrapped it in quotes.
This commit fixes those things as much as possible:
* Proper JSON escaping is preserved for multi-line strings.
* Other data types such as arrays and hashes are properly passed into
hiera, regardless if their string representation would be single-line
or multi-line.
However, single-line strings are still treated as raw YAML, because
tripleo-heat-templates already depend on that behavior (instead of
having arrays in Heat metadata, we have strings there formatted as
arrays).
Change-Id: Ie984f3c7782687235cdc2d72ef1f94af89dc3ed4
Closes-Bug: #1462369
The puppet command uses /etc/puppet/hiera.yaml as it's hiera
configuration file, but the hiera command when run standalone uses
/etc/hiera.yaml as its configuration file. Therefore, it's useful to
create this symlink so that when running hiera standalone to verify or
debug configurations, you don't have to pass a config file argument.
Change-Id: I0f8dbc3554b014a33ad398bfcf040aac0b288d1d
Provides a way to configure hiera.yaml and deploy custom
JSON or YAML hiera datafiles via Heat. There are 3
ways to get data into Hiera files:
-static data
-mapped data
-OAC (os-apply-config) mapped data
By default the mapped and OAC data formats use YAML.
Static data files can be in either format.
Change-Id: I3a3eb8382b34112784799f48bcf86015ea56f304