Showing with 631 additions and 295 deletions.
  1. +7 −2 .github/CONTRIBUTING.md
  2. +1 −0 .gitignore
  3. +1 −1 .msync.yml
  4. +3 −0 .rubocop.yml
  5. +140 −101 CHANGELOG.md
  6. +6 −2 Gemfile
  7. +113 −66 README.md
  8. +2 −11 Rakefile
  9. +8 −5 manifests/deep_merge.pp
  10. +16 −6 manifests/eyaml.pp
  11. +19 −15 manifests/eyaml_gpg.pp
  12. +6 −2 manifests/init.pp
  13. +0 −1 manifests/install.pp
  14. +1 −1 metadata.json
  15. +1 −1 spec/acceptance/hiera_spec.rb
  16. +3 −0 spec/acceptance/nodesets/centos-511-x64.yml
  17. +3 −0 spec/acceptance/nodesets/centos-66-x64-pe.yml
  18. +3 −0 spec/acceptance/nodesets/centos-66-x64.yml
  19. +3 −0 spec/acceptance/nodesets/centos-72-x64.yml
  20. +3 −0 spec/acceptance/nodesets/debian-78-x64.yml
  21. +3 −0 spec/acceptance/nodesets/debian-82-x64.yml
  22. +19 −0 spec/acceptance/nodesets/docker/centos-5.yml
  23. +20 −0 spec/acceptance/nodesets/docker/centos-6.yml
  24. +18 −0 spec/acceptance/nodesets/docker/centos-7.yml
  25. +19 −0 spec/acceptance/nodesets/docker/debian-7.yml
  26. +20 −0 spec/acceptance/nodesets/docker/debian-8.yml
  27. +19 −0 spec/acceptance/nodesets/docker/ubuntu-12.04.yml
  28. +21 −0 spec/acceptance/nodesets/docker/ubuntu-14.04.yml
  29. +19 −0 spec/acceptance/nodesets/docker/ubuntu-16.04.yml
  30. +0 −18 spec/acceptance/nodesets/pe-redhat-7-vcloud.yml
  31. +0 −18 spec/acceptance/nodesets/pe-ubuntu-1404-vcloud.yml
  32. +0 −15 spec/acceptance/nodesets/redhat-7-vcloud.yml
  33. +0 −15 spec/acceptance/nodesets/ubuntu-1404-vcloud.yml
  34. +3 −0 spec/acceptance/nodesets/ubuntu-server-1204-x64.yml
  35. +3 −0 spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
  36. +15 −0 spec/acceptance/nodesets/ubuntu-server-1604-x64.yml
  37. +99 −15 spec/classes/hiera_spec.rb
  38. +14 −0 spec/spec_helper.rb
9 changes: 7 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ check various syntax and style things. You can run these locally with:
bundle exec rake lint
bundle exec rake validate

It will also run some [Rubocop](http://batsov.com/rubocop/) tests
against it. You can run those locally ahead of time with:

bundle exec rake rubocop

## Running the unit tests

The unit test suite covers most of the code, as mentioned above please
Expand Down Expand Up @@ -85,9 +90,9 @@ with:
bundle exec rake acceptance

This will run the tests on an Ubuntu 12.04 virtual machine. You can also
run the integration tests against Centos 6.5 with.
run the integration tests against Centos 6.6 with.

BEAKER_set=centos-64-x64 bundle exec rake acceptances
BEAKER_set=centos-66-x64 bundle exec rake acceptances

If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ log/
.idea/
*.iml
.*.sw
.yardoc/
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.12.8'
modulesync_config_version: '0.15.0'
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Style/AndOr:
Style/RedundantSelf:
Enabled: True

Metrics/BlockLength:
Enabled: False

# Method length is not necessarily an indicator of code quality
Metrics/MethodLength:
Enabled: False
Expand Down
241 changes: 140 additions & 101 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,185 +1,224 @@
# Change log

All notable changes to this project will be documented in this file.
Each new release typically also includes the latest Vox Pupuli modulesync defaults.
These should not impact the functionality of the module.

## 2016-11-07 Release 2.3.0

* [GH-128](https://github.com/voxpupuli/puppet-hiera/issues/128)
The `manage_package` parameter now effects all packages.
* [GH-161](https://github.com/voxpupuli/puppet-hiera/issues/161)
Regression fix. Make eyaml be the first backend again.

## 2016-10-07 Release 2.2.0

* Modulesync with latest Vox Pupuli defaults
* Removes unused eyaml_gpg_keygen variable
### Features:
* Removes unused `eyaml_gpg_keygen` variable

### Features

* Adds support for 3rd party backends #153

This module now supports configuration of any backend via a new `backend_options`
parameter. This is a big deal as this opens the doors up to configuring any backend in a generic way.
This is also backwards compatible with prior versions of this module.
parameter. This is a big deal as this opens the doors up to configuring any
backend in a generic way. This is also backwards compatible with prior versions
of this module.

## 2016-08-31 Release 2.1.2

* Modulesync with latest Vox Pupuli defaults
* Fix handling of gem_source (correctly handle URLs)

* Fix handling of `gem_source` (correctly handle URLs)

## 2016-08-19 Release 2.1.1

* Modulesync with latest Vox Pupuli defaults
* Fix: Replace `to_yaml` in hiera.yaml template (PR #134)


## 2016-05-21 Release 2.1.0

Note: this is the first release of the module in the voxpupuli namespace.
### Features:
- Add parameters to give more control over package management:
- `eyaml_name`
- `eyaml_version`
- `eyaml_source` (deprecates `gem_source` parameter)
- `deep_merge_name`
- `deep_merge_version`
- `deep_merge_source`
- `manage_package`
- `package_name`
- `package_source`
- Add `deep_merge_options` parameter for passing parameters in hiera.yaml
- The `merge_behavior` parameter installs the `deep_merge` gem when needed.

### Bugfixes:
- Typo for `master_service` parameter in readme.
- Improve dependency management around packages
- Fix `hierarchy` parameter default on Puppet 4

### Features

* Add parameters to give more control over package management:
* `eyaml_name`
* `eyaml_version`
* `eyaml_source` (deprecates `gem_source` parameter)
* `deep_merge_name`
* `deep_merge_version`
* `deep_merge_source`
* `manage_package`
* `package_name`
* `package_source`
* Add `deep_merge_options` parameter for passing parameters in hiera.yaml
* The `merge_behavior` parameter installs the `deep_merge` gem when needed.

### Bugfixes

* Typo for `master_service` parameter in readme.
* Improve dependency management around packages
* Fix `hierarchy` parameter default on Puppet 4

## 2016-01-27 Release 2.0.1
### Fixes:
- Fix key creation when passing a custom `hiera::keysdir`

### Fixes

* Fix key creation when passing a custom `hiera::keysdir`

## 2016-01-26 Release 2.0.0
### Changes:
- eyaml keys/ directory moved from `/etc/puppetlabs/code/keys` to

### Changes

* eyaml keys/ directory moved from `/etc/puppetlabs/code/keys` to
`/etc/puppetlabs/puppet/keys` on PE > 3.x. You should move you keys directory
when upgrading.
- `hiera::hiera_yaml` default changed from `/etc/puppetlabs/code/hiera.yaml` to
* `hiera::hiera_yaml` default changed from `/etc/puppetlabs/code/hiera.yaml` to
`/etc/puppetlabs/puppet/hiera.yaml` on Puppet >= 4.x. The hiera\_yaml puppet
config setting in puppet.conf should be updated when upgrading; see
`hiera::puppet_conf_manage`
- `hiera::datadir` default changed from `/etc/puppetlabs/puppet/hieradata` to
* `hiera::datadir` default changed from `/etc/puppetlabs/puppet/hieradata` to
`/etc/puppetlabs/code/environments/%{::environment}/hieradata` on puppet
versions >= 4. Verify that this is your prefered value when upgrading.

### Features:
- No longer using exec resources to install eyaml on puppet versions >= 4!
- Add `hiera::puppet_conf_manage` parameter to manage `hiera_conf` puppet.conf setting
- Add `hiera::keysdir` parameter for putting the keys somewhere other than $confdir/keys
### Features

* No longer using exec resources to install eyaml on puppet versions >= 4!
* Add `hiera::puppet_conf_manage` parameter to manage `hiera_conf` puppet.conf setting
* Add `hiera::keysdir` parameter for putting the keys somewhere other than $confdir/keys

### Bugfixes:
- Fix hiera.yaml and keys/ directory being overwritten by file sync on PE 2015.x
- Fix eyaml package provider detection on puppet versions >= 4
### Bugfixes

* Fix hiera.yaml and keys/ directory being overwritten by file sync on PE 2015.x
* Fix eyaml package provider detection on puppet versions >= 4

## 2016-01-08 Release 1.4.1
### Bugfixes:
- Fix rubocop linting
- Correct the name of the license file so the forge can find it.
- Add travis testing

### Bugfixes

* Fix rubocop linting
* Correct the name of the license file so the forge can find it.
* Add travis testing

## 2016-01-05 Release 1.4.0
### Features:
- Added `hiera::create_symlink` parameter to disable /etc/hiera.yaml creation
- Added `hiera::master_service` parameter to set the master service name
- Added ability to restart master service on hiera.yaml change
- Added beaker-rspec acceptance tests
- Bumped PE range to include 2015.3

### Bugfixes:
- Fixed bugs on PE 2015.2 when versioncmp() raised errors
- Fixed hiera.yaml output to be consistent across puppet 3 and 4
- Fixed stdlib metadata requirement.
### Features

* Added `hiera::create_symlink` parameter to disable /etc/hiera.yaml creation
* Added `hiera::master_service` parameter to set the master service name
* Added ability to restart master service on hiera.yaml change
* Added beaker-rspec acceptance tests
* Bumped PE range to include 2015.3

### Bugfixes

* Fixed bugs on PE 2015.2 when versioncmp() raised errors
* Fixed hiera.yaml output to be consistent across puppet 3 and 4
* Fixed stdlib metadata requirement.

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

### Bugfixes

* Detect correct user on 2015.2.0
* Clean up hiera formatting.

## 2015-07-24 Release 1.3.1
### Bugfixes:
- Allow `eyaml_version` to be undef (the default) on PE 3.7/3.8

### Bugfixes

* Allow `eyaml_version` to be undef (the default) on PE 3.7/3.8

## 2015-07-23 Release 1.3.0
### Features:
- Add PE 3.8 support
- Add Puppet 4 support

### Bugfixes:
- Fix `eyaml_datadir` parameter default to `datadir` value
- Handle cmdpath on different versions of puppet
### Features

* Add PE 3.8 support
* Add Puppet 4 support

### Bugfixes

* Fix `eyaml_datadir` parameter default to `datadir` value
* Handle cmdpath on different versions of puppet

## 2015-03-05 Release 1.2.0
### Features:
- Added `hiera::create_keys` param to disable pkcs7 key generation with

### Features

* Added `hiera::create_keys` param to disable pkcs7 key generation with
hiera-eyaml
- Added `hiera::gem_source` param to specify source of hiera-eyaml gem
- Added `hiera::eyaml_version` param to specify the version of eyaml
* Added `hiera::gem_source` param to specify source of hiera-eyaml gem
* Added `hiera::eyaml_version` param to specify the version of eyaml

### Bugfixes:
- Change Modulefile to metadata.json
- Add validation on `merge_behavior` param
- Make it kind of work on PE 3.7 (pe-puppetserver must still be restarted after
the gem is installed)
### Bugfixes

* Change Modulefile to metadata.json
* Add validation on `merge_behavior` param
* Make it kind of work on PE 3.7 (pe-puppetserver must still be restarted after
the gem is installed)

## 2014-11-21 Release 1.1.1
### Bugfixes:
- Correct handling of `cmdpath` (using an array of paths instead of hardcoded
path). Also adds `cmdpath` parameter
- Fix permissions on private key (604 was a typo)
- Add "Managed by puppet" header

### Bugfixes

* Correct handling of `cmdpath` (using an array of paths instead of hardcoded
path). Also adds `cmdpath` parameter
* Fix permissions on private key (604 was a typo)
* Add "Managed by puppet" header

## 2014-10-15 Release 1.1.0
### Features:
- Added `eyaml`, `eyaml_datadir`, & `eyaml_extension` parameters to hiera class

### Features

* Added `eyaml`, `eyaml_datadir`, & `eyaml_extension` parameters to hiera class
for configuring hiera-eyaml
- Added `hiera::datadir_manage` parameter to disable datadir management
- Added `hiera::logger` parameter to change logger
- Added `hiera::merge_behavior` parameter to change the hash merge behavior
- Added some spec tests
- Added new readme
* Added `hiera::datadir_manage` parameter to disable datadir management
* Added `hiera::logger` parameter to change logger
* Added `hiera::merge_behavior` parameter to change the hash merge behavior
* Added some spec tests
* Added new readme

### Bugfixes:
- Correct datadir regex `{}` matching
### Bugfixes

* Correct datadir regex `{}` matching

## 2014-05-01 Release 1.0.2
- Remove swap files from package

* Remove swap files from package

## 2014-03-25 Release 1.0.1
### Bugfixes:
- Readme tweak
- Use template instance variables to remove warnings

### Bugfixes

* Readme tweak
* Use template instance variables to remove warnings

## 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
### 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!

### Bugfixes

* Docs!

## 2013-06-17 Release 0.3.0
### Features:
- PE + POSS support

### Bugfixes:
- Only ensure datadir if it does not have `%{.*}`
### Features

* PE + POSS support

### Bugfixes

* Only ensure datadir if it does not have `%{.*}`

[2.2.0]: https://github.com/hunner/puppet-hiera/compare/2.1.1...v2.2.0
[2.1.1]: https://github.com/hunner/puppet-hiera/compare/2.1.0...v2.1.1
Expand Down
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end

group :test do
gem 'puppetlabs_spec_helper', '~> 1.2.2', :require => false
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
gem 'puppet-lint-absolute_classname-check', :require => false
Expand All @@ -25,9 +25,12 @@ group :test do
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
gem 'puppet-strings', '0.4.0', :require => false
gem 'puppet-strings', '~> 0.99.0', :require => false
gem 'rubocop-rspec', '~> 1.6', :require => false if RUBY_VERSION >= '2.3.0'
gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0'
gem 'mocha', '>= 1.2.1', :require => false
gem 'coveralls', :require => false if RUBY_VERSION >= '2.0.0'
gem 'simplecov-console', :require => false if RUBY_VERSION >= '2.0.0'
end

group :development do
Expand All @@ -45,6 +48,7 @@ group :system_tests do
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
end

Expand Down
Loading