Showing with 47 additions and 44 deletions.
  1. +16 −0 CHANGELOG.md
  2. +2 −2 manifests/eyaml.pp
  3. +2 −2 manifests/eyaml_gpg.pp
  4. +3 −1 manifests/init.pp
  5. +22 −37 manifests/params.pp
  6. +2 −2 metadata.json
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v3.4.1](https://github.com/voxpupuli/puppet-hiera/tree/v3.4.1) (2019-05-01)

[Full Changelog](https://github.com/voxpupuli/puppet-hiera/compare/v3.4.0...v3.4.1)

**Fixed bugs:**

- Permission contention on hiera.yaml between module and PE [\#260](https://github.com/voxpupuli/puppet-hiera/pull/260) ([rnelson0](https://github.com/rnelson0))

**Closed issues:**

- Permission contention on hiera.yaml between module and PE [\#245](https://github.com/voxpupuli/puppet-hiera/issues/245)

**Merged pull requests:**

- Allow `puppetlabs/inifile` 3.x [\#256](https://github.com/voxpupuli/puppet-hiera/pull/256) ([alexjfisher](https://github.com/alexjfisher))

## [v3.4.0](https://github.com/voxpupuli/puppet-hiera/tree/v3.4.0) (2019-04-25)

[Full Changelog](https://github.com/voxpupuli/puppet-hiera/compare/v3.3.4...v3.4.0)
Expand Down
4 changes: 2 additions & 2 deletions manifests/eyaml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
$eyaml_version = $::hiera::eyaml_version
$eyaml_source = $::hiera::_eyaml_source

$owner = $::hiera::owner
$group = $::hiera::group
$owner = $::hiera::eyaml_owner
$group = $::hiera::eyaml_group
$cmdpath = $::hiera::cmdpath
$confdir = $::hiera::confdir
$create_keys = $::hiera::create_keys
Expand Down
4 changes: 2 additions & 2 deletions manifests/eyaml_gpg.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
$ruby_gpg_version = $::hiera::ruby_gpg_version
$ruby_gpg_source = $::hiera::ruby_gpg_source

$owner = $::hiera::owner
$group = $::hiera::group
$owner = $::hiera::eyaml_owner
$group = $::hiera::eyaml_group
$cmdpath = $::hiera::cmdpath
$_keysdir = $::hiera::_keysdir

Expand Down
4 changes: 3 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
$datadir_manage = true,
$owner = $::hiera::params::owner,
$group = $::hiera::params::group,
$eyaml_owner = $::hiera::params::eyaml_owner,
$eyaml_group = $::hiera::params::eyaml_group,
$provider = $::hiera::params::provider,
$eyaml = false,
$eyaml_name = 'hiera-eyaml',
Expand Down Expand Up @@ -248,7 +250,7 @@
# Determine hiera version
case $hiera_version {
'5': { if ($hierarchy !~ Hiera::Hiera5_hierarchy) {
fail('${hierarchy} should be an array of hash')
fail('`hierarchy` should be an array of hash')
}
else
{ $hiera_template = epp('hiera/hiera.yaml.epp',
Expand Down
59 changes: 22 additions & 37 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,27 @@
$package_ensure = 'present'
$package_name = 'hiera'
$hierarchy = []
if str2bool($facts['is_pe']) {
$hiera_yaml = '/etc/puppetlabs/puppet/hiera.yaml'
$datadir = '/etc/puppetlabs/puppet/hieradata'
$owner = 'pe-puppet'
$group = 'pe-puppet'
$cmdpath = ['/opt/puppet/bin', '/usr/bin', '/usr/local/bin']
$manage_package = false

if $::pe_version and versioncmp($::pe_version, '3.7.0') >= 0 {
$provider = 'pe_puppetserver_gem'
$master_service = 'pe-puppetserver'
} else {
$provider = 'pe_gem'
$master_service = 'pe-httpd'
}
} else {
# Configure for AIO packaging.
if getvar('::pe_server_version') {
$master_service = 'pe-puppetserver'
$provider = 'puppetserver_gem'
} else {
# It would probably be better to assume this is puppetserver, but that
# would be a backwards-incompatible change.
$master_service = 'puppetmaster'
$provider = 'puppet_gem'
}
$cmdpath = ['/opt/puppetlabs/puppet/bin', '/usr/bin', '/usr/local/bin']
$datadir = '/etc/puppetlabs/code/environments/%{::environment}/hieradata'
$manage_package = false
if getvar('::pe_server_version') {
$owner = 'pe-puppet'
$group = 'pe-puppet'
} else {
$owner = 'puppet'
$group = 'puppet'
}
$hiera_yaml = "${confdir}/hiera.yaml"
# Configure for AIO packaging.
if $facts['pe_server_version'] {
$master_service = 'pe-puppetserver'
$provider = 'puppetserver_gem'
$owner = 'root'
$group = 'root'
$eyaml_owner = 'pe-puppet'
$eyaml_group = 'pe-puppet'
}
else {
# It would probably be better to assume this is puppetserver, but that
# would be a backwards-incompatible change.
$master_service = 'puppetmaster'
$provider = 'puppet_gem'
$owner = 'puppet'
$group = 'puppet'
$eyaml_owner = 'puppet'
$eyaml_group = 'puppet'
}
$cmdpath = ['/opt/puppetlabs/puppet/bin', '/usr/bin', '/usr/local/bin']
$datadir = '/etc/puppetlabs/code/environments/%{::environment}/hieradata'
$manage_package = false
$hiera_yaml = "${confdir}/hiera.yaml"
}
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-hiera",
"version": "3.4.0",
"version": "3.4.1",
"author": "Vox Pupuli",
"summary": "Deploy hiera.yaml with hierarchy, and datadir",
"license": "Apache-2.0",
Expand All @@ -14,7 +14,7 @@
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 1.4.1 < 3.0.0"
"version_requirement": ">= 1.4.1 < 4.0.0"
}
],
"operatingsystem_support": [
Expand Down