Showing with 57 additions and 11 deletions.
  1. +2 −0 .fixtures.yml
  2. +6 −0 CHANGELOG.md
  3. +0 −1 README.md
  4. +8 −3 manifests/params.pp
  5. +32 −2 metadata.json
  6. +9 −5 templates/hiera.yaml.erb
2 changes: 2 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fixtures:
symlinks:
"hiera": "#{source_dir}"
repositories:
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change log
All notable changes to this project will be documented in this file.

## [1.3.2] - 2015-09-14
### Bugfixes:
- Detect correct user on 2015.2.0
- Clean up hiera formatting.

## [1.3.1] - 2015-07-24
### Bugfixes:
- Allow `eyaml_version` to be undef (the default) on PE 3.7/3.8
Expand Down Expand Up @@ -74,6 +79,7 @@ All notable changes to this project will be documented in this file.
### Bugfixes:
- Only ensure datadir if it does not have `%{.*}`

[1.3.2]: https://github.com/hunner/puppet-hiera/compare/1.3.1...1.3.2
[1.3.1]: https://github.com/hunner/puppet-hiera/compare/1.3.0...1.3.1
[1.3.0]: https://github.com/hunner/puppet-hiera/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/hunner/puppet-hiera/compare/1.1.1...1.2.0
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Hiera Puppet
[![Puppet Forge](http://img.shields.io/puppetforge/v/hunner/hiera.svg)](https://forge.puppetlabs.com/hunner/hiera)
####Table of Contents

1. [Overview](#overview)
Expand Down
11 changes: 8 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
$confdir = '/etc/puppetlabs/puppet'
$cmdpath = ['/opt/puppet/bin', '/usr/bin', '/usr/local/bin']


if versioncmp($::pe_version, '3.7.0') >= 0 {
$provider = 'pe_puppetserver_gem'
}
Expand All @@ -41,9 +40,15 @@
$confdir = '/etc/puppet'
$cmdpath = ['/usr/bin', '/usr/local/bin']
}
if versioncmp($::pe_server_version, '2015.2.0') >= 0 {
$owner = 'pe-puppet'
$group = 'pe-puppet'
}
else {
$owner = 'puppet'
$group = 'puppet'
}
$hiera_yaml = "${confdir}/hiera.yaml"
$datadir = "${confdir}/hieradata"
$owner = 'puppet'
$group = 'puppet'
}
}
34 changes: 32 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,42 @@
{
"name": "hunner-hiera",
"version": "1.3.1",
"version": "1.3.2",
"author": "hunner",
"summary": "Deploy hiera.yaml with hierarchy, and datadir",
"license": "BSD-2-Clause",
"source": "https://github.com/hunner/puppet-hiera",
"project_page": "https://github.com/hunner/hunner-hiera",
"issues_url": "https://github.com/hunner/puppet-hiera/issues",
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"12.04",
"14.04"
]
}
],
"requirements": [
{
"name": "pe",
Expand All @@ -20,7 +50,7 @@
"dependencies": [
{
"name": "puppetlabs-stdlib",
"version_range": ">= 4.3.1"
"version_range": ">= 4.3.1 < 5.0.0"
}
]
}
14 changes: 9 additions & 5 deletions templates/hiera.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
@backends.unshift('eyaml')
@backends = @backends.uniq
end -%>
<%= @backends.to_yaml.split("\n")[1..-1].join("\n") %>
<%= @backends.to_yaml.split("\n")[1..-1].map{|e| " #{e}"}.join("\n") %>

:logger: <%= @logger %>

:hierarchy:
<%= @hierarchy.to_yaml.split("\n")[1..-1].join("\n") %>
<%= @hierarchy.to_yaml.split("\n")[1..-1].map{|e| " #{e}"}.join("\n") %>

:yaml:
:datadir: <%= @datadir %>
:datadir: <%= @datadir %>
<% if @eyaml -%>

:eyaml:
:datadir: <%= @eyaml_real_datadir %>
<% if @eyaml_extension -%>
Expand All @@ -22,9 +24,11 @@ end -%>
:pkcs7_private_key: <%= @confdir %>/keys/private_key.pkcs7.pem
:pkcs7_public_key: <%= @confdir %>/keys/public_key.pkcs7.pem
<% end -%>
<% if @merge_behavior -%>

:merge_behavior: <%= @merge_behavior -%>
<% end -%>
<% if @extra_config && !@extra_config.empty? -%>
<%= @extra_config %>
<% end -%>