Commit Graph

4 Commits

Author SHA1 Message Date
Jiri Stransky
5d2d14f690 Preserve data types in Hiera where possible
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
2015-06-05 15:26:23 +02:00
Derek Higgins
0eebb19e59 Ensure the hieradata directory isn't world readable
This directory contains all kinds of secrets and shouldn't be
readable to non privileged users.

Change-Id: Ia941e0f0a3ae5cf50259fbb8e13375ab2989eaa1
2015-05-15 14:16:57 +01:00
James Slagle
790b941a89 Symlink /etc/hiera.yaml -> /etc/puppet/hiera.yaml
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
2015-02-06 06:03:57 -05:00
Dan Prince
8181100770 Add a Hiera element
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
2015-01-09 14:27:02 -05:00