Showing with 28 additions and 3 deletions.
  1. +9 −0 CHANGELOG
  2. +1 −1 Modulefile
  3. +12 −1 manifests/init.pp
  4. +2 −0 manifests/params.pp
  5. +4 −1 templates/hiera.yaml.erb
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2014-02-27 Release 1.0.0

Features:
- `backends` parameter for an array of hiera backends
- `extra_config` parameter for a string of extra yaml config

Bugfixes:
- Correct the yaml formatting

2013-06-17 Release 0.3.1
Bugfixes:
- Docs!
Expand Down
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'hunner-hiera'
version '0.3.1'
version '1.0.0'
source 'UNKNOWN'
author 'hunner'
license 'BSD'
Expand Down
13 changes: 12 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
# Hiera hierarchy.
# Default: empty
#
# [*backends*]
# Hiera backends.
# Default: ['yaml']
#
# [*hiera_yaml*]
# Heira config file.
# Default: auto-set, platform specific
Expand All @@ -24,6 +28,11 @@
# Group owner of the files.
# Default: auto-set, platform specific
#
# [*extra_config*]
# An extra string fragment of YAML to append to the config file.
# Useful for configuring backend-specific parameters.
# Default: ''
#
# === Actions:
#
# Installs either /etc/puppet/hiera.yaml or /etc/puppetlabs/puppet/hiera.yaml.
Expand Down Expand Up @@ -55,10 +64,12 @@
#
class hiera (
$hierarchy = [],
$backends = $hiera::params::backends,
$hiera_yaml = $hiera::params::hiera_yaml,
$datadir = $hiera::params::datadir,
$owner = $hiera::params::owner,
$group = $hiera::params::group
$group = $hiera::params::group,
$extra_config = '',
) inherits hiera::params {
File {
owner => $owner,
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@
$owner = 'puppet'
$group = 'puppet'
}

$backends = ['yaml']
}
5 changes: 4 additions & 1 deletion templates/hiera.yaml.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
:backends: - yaml
:backends:
<%= backends.to_yaml.split("\n")[1..-1].join("\n") %>
:logger: console
:hierarchy:
<%= hierarchy.to_yaml.split("\n")[1..-1].join("\n") %>

:yaml:
:datadir: <%= datadir %>
<%= extra_config %>