12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ Thank you for contributing to this project!
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
-->
#### Pull Request (PR) description
<!--
Replace this comment with a description of your pull request.
-->

#### This Pull Request (PR) fixes the following issues
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '1.5.0'
modulesync_config_version: '1.9.0'
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Style/HashSyntax:
Style/RedundantReturn:
Enabled: True

Style/EndOfLine:
Layout/EndOfLine:
Enabled: False

Lint/AmbiguousOperator:
Expand Down
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,25 @@ dist: trusty
language: ruby
cache: bundler
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- gem --version
- bundle -v
- rm -f Gemfile.lock
script:
- 'bundle exec rake $CHECK'
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=16
- rvm: 2.4.2
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
- rvm: 2.4.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test_with_coveralls
- rvm: 2.4.2
- rvm: 2.5.0
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test_with_coveralls
- rvm: 2.4.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=rubocop
- rvm: 2.4.2
- rvm: 2.4.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
branches:
Expand Down
34 changes: 13 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ 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.3.2](https://github.com/voxpupuli/puppet-hiera/tree/v3.3.2) (2018-03-28)

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

**Fixed bugs:**

- Fix side affect in that the eyaml will always be first for backend lookups [\#216](https://github.com/voxpupuli/puppet-hiera/pull/216) ([mcmartins](https://github.com/mcmartins))

**Merged pull requests:**

- bump puppet to latest supported version 4.10.0 [\#217](https://github.com/voxpupuli/puppet-hiera/pull/217) ([bastelfreak](https://github.com/bastelfreak))

## [v3.3.1](https://github.com/voxpupuli/puppet-hiera/tree/v3.3.1) (2017-12-09)

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

**Merged pull requests:**

- Update Setup Requirements [\#210](https://github.com/voxpupuli/puppet-hiera/pull/210) ([krisamundson](https://github.com/krisamundson))
- Release 3.3.0 [\#209](https://github.com/voxpupuli/puppet-hiera/pull/209) ([bastelfreak](https://github.com/bastelfreak))

## [v3.3.0](https://github.com/voxpupuli/puppet-hiera/tree/v3.3.0) (2017-10-16)

Expand All @@ -33,10 +44,6 @@ These should not affect the functionality of the module.

- Release new tag incorporating \#197, \#200 [\#202](https://github.com/voxpupuli/puppet-hiera/issues/202)

**Merged pull requests:**

- Release 3.2.0 [\#207](https://github.com/voxpupuli/puppet-hiera/pull/207) ([bastelfreak](https://github.com/bastelfreak))

## [v3.1.0](https://github.com/voxpupuli/puppet-hiera/tree/v3.1.0) (2017-08-31)

[Full Changelog](https://github.com/voxpupuli/puppet-hiera/compare/v3.0.0...v3.1.0)
Expand All @@ -52,7 +59,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 3.1.0 [\#203](https://github.com/voxpupuli/puppet-hiera/pull/203) ([reidmv](https://github.com/reidmv))
- Minor README.md fixes [\#199](https://github.com/voxpupuli/puppet-hiera/pull/199) ([naeem98](https://github.com/naeem98))

## [v3.0.0](https://github.com/voxpupuli/puppet-hiera/tree/v3.0.0) (2017-05-11)
Expand All @@ -69,10 +75,8 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 3.0.0 [\#196](https://github.com/voxpupuli/puppet-hiera/pull/196) ([alexjfisher](https://github.com/alexjfisher))
- Add gem\_install\_options parameter [\#193](https://github.com/voxpupuli/puppet-hiera/pull/193) ([alexjfisher](https://github.com/alexjfisher))
- Modulesync 0.19.0 [\#185](https://github.com/voxpupuli/puppet-hiera/pull/185) ([bastelfreak](https://github.com/bastelfreak))
- release 2.4.0 [\#184](https://github.com/voxpupuli/puppet-hiera/pull/184) ([bastelfreak](https://github.com/bastelfreak))

## [v2.4.0](https://github.com/voxpupuli/puppet-hiera/tree/v2.4.0) (2017-01-13)

Expand Down Expand Up @@ -110,7 +114,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 2.3.0 [\#168](https://github.com/voxpupuli/puppet-hiera/pull/168) ([alexjfisher](https://github.com/alexjfisher))
- modulesync 0.15.0 [\#167](https://github.com/voxpupuli/puppet-hiera/pull/167) ([bastelfreak](https://github.com/bastelfreak))
- Update to new is\_expected.to syntax in favor of should [\#166](https://github.com/voxpupuli/puppet-hiera/pull/166) ([vStone](https://github.com/vStone))
- Add missing badges [\#165](https://github.com/voxpupuli/puppet-hiera/pull/165) ([dhoppe](https://github.com/dhoppe))
Expand All @@ -130,7 +133,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- release for version 2.2.0 [\#157](https://github.com/voxpupuli/puppet-hiera/pull/157) ([logicminds](https://github.com/logicminds))
- fixes issue with new backend merge logic [\#156](https://github.com/voxpupuli/puppet-hiera/pull/156) ([logicminds](https://github.com/logicminds))
- modulesync 0.12.8 [\#155](https://github.com/voxpupuli/puppet-hiera/pull/155) ([bastelfreak](https://github.com/bastelfreak))
- Fixes \#153 - Add support for 3rd party backends [\#154](https://github.com/voxpupuli/puppet-hiera/pull/154) ([logicminds](https://github.com/logicminds))
Expand Down Expand Up @@ -196,7 +198,6 @@ These should not affect the functionality of the module.
- Fix issue where find returns exit code 0 regardless of a regex match [\#130](https://github.com/voxpupuli/puppet-hiera/pull/130) ([treydock](https://github.com/treydock))
- Add new eyaml\_pkcs7\_public/private\_key params [\#127](https://github.com/voxpupuli/puppet-hiera/pull/127) ([alexjfisher](https://github.com/alexjfisher))
- Allow puppetserver to be used with foss P3 [\#125](https://github.com/voxpupuli/puppet-hiera/pull/125) ([hunner](https://github.com/hunner))
- Release 2.1.0 [\#123](https://github.com/voxpupuli/puppet-hiera/pull/123) ([hunner](https://github.com/hunner))
- proper name for master\_service attribute [\#121](https://github.com/voxpupuli/puppet-hiera/pull/121) ([tuxmea](https://github.com/tuxmea))
- Remove custom eyaml package from test [\#120](https://github.com/voxpupuli/puppet-hiera/pull/120) ([hunner](https://github.com/hunner))
- GH-92: Default to undef for hierarchy on puppet 4+ [\#119](https://github.com/voxpupuli/puppet-hiera/pull/119) ([jyaworski](https://github.com/jyaworski))
Expand All @@ -212,7 +213,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 2.0.1 [\#112](https://github.com/voxpupuli/puppet-hiera/pull/112) ([hunner](https://github.com/hunner))
- Fix rubocop trailing comma and errors [\#111](https://github.com/voxpupuli/puppet-hiera/pull/111) ([hunner](https://github.com/hunner))
- Fixes bug in the latest push from PR \#102, that doesn't use the \_keysdir path when creating keys [\#110](https://github.com/voxpupuli/puppet-hiera/pull/110) ([smbambling](https://github.com/smbambling))

Expand All @@ -239,7 +239,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 1.4.1 [\#101](https://github.com/voxpupuli/puppet-hiera/pull/101) ([hunner](https://github.com/hunner))
- Travis CI [\#100](https://github.com/voxpupuli/puppet-hiera/pull/100) ([rnelson0](https://github.com/rnelson0))
- Add provider to class parameters [\#90](https://github.com/voxpupuli/puppet-hiera/pull/90) ([jyaworski](https://github.com/jyaworski))

Expand All @@ -253,7 +252,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 1.4.0 [\#99](https://github.com/voxpupuli/puppet-hiera/pull/99) ([hunner](https://github.com/hunner))
- Only pass strings to versioncmp [\#98](https://github.com/voxpupuli/puppet-hiera/pull/98) ([hunner](https://github.com/hunner))
- Added option to switch on/off the creation of the /etc/hiera.yaml [\#88](https://github.com/voxpupuli/puppet-hiera/pull/88) ([crayfishx](https://github.com/crayfishx))
- Fixing 2015.2 handling [\#86](https://github.com/voxpupuli/puppet-hiera/pull/86) ([hunner](https://github.com/hunner))
Expand All @@ -265,7 +263,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 1.3.2 [\#81](https://github.com/voxpupuli/puppet-hiera/pull/81) ([hunner](https://github.com/hunner))
- Clean up style of hiera.yaml.erb template [\#80](https://github.com/voxpupuli/puppet-hiera/pull/80) ([reidmv](https://github.com/reidmv))
- Add default compatibility with PE 2015.2.0 [\#79](https://github.com/voxpupuli/puppet-hiera/pull/79) ([reidmv](https://github.com/reidmv))

Expand All @@ -288,7 +285,6 @@ These should not affect the functionality of the module.
**Closed issues:**

- eyaml datadir [\#61](https://github.com/voxpupuli/puppet-hiera/issues/61)
- Generate a new release [\#48](https://github.com/voxpupuli/puppet-hiera/issues/48)
- Allow user to specify version of hiera-eyaml [\#47](https://github.com/voxpupuli/puppet-hiera/issues/47)
- Update Puppet Forge [\#26](https://github.com/voxpupuli/puppet-hiera/issues/26)

Expand All @@ -314,7 +310,6 @@ These should not affect the functionality of the module.
**Merged pull requests:**

- Add eyaml gem version param [\#60](https://github.com/voxpupuli/puppet-hiera/pull/60) ([hunner](https://github.com/hunner))
- Release 1.2.0 [\#59](https://github.com/voxpupuli/puppet-hiera/pull/59) ([hunner](https://github.com/hunner))
- Terrimonster fix 37 prov [\#58](https://github.com/voxpupuli/puppet-hiera/pull/58) ([hunner](https://github.com/hunner))
- Reformat parameters in README to be more readable [\#57](https://github.com/voxpupuli/puppet-hiera/pull/57) ([elyscape](https://github.com/elyscape))
- Restructure/reformat change log [\#56](https://github.com/voxpupuli/puppet-hiera/pull/56) ([elyscape](https://github.com/elyscape))
Expand All @@ -336,7 +331,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 1.1.1 [\#41](https://github.com/voxpupuli/puppet-hiera/pull/41) ([hunner](https://github.com/hunner))
- Make hiera::eyaml defaults come from base class [\#40](https://github.com/voxpupuli/puppet-hiera/pull/40) ([hunner](https://github.com/hunner))
- Adds puppet forge link to readme [\#39](https://github.com/voxpupuli/puppet-hiera/pull/39) ([spuder](https://github.com/spuder))
- Fix key generation [\#37](https://github.com/voxpupuli/puppet-hiera/pull/37) ([emning](https://github.com/emning))
Expand All @@ -357,7 +351,6 @@ These should not affect the functionality of the module.
**Merged pull requests:**

- We want eyaml to come before yaml by default [\#29](https://github.com/voxpupuli/puppet-hiera/pull/29) ([hunner](https://github.com/hunner))
- Release 1.1.0 [\#28](https://github.com/voxpupuli/puppet-hiera/pull/28) ([hunner](https://github.com/hunner))
- Patch eyaml [\#27](https://github.com/voxpupuli/puppet-hiera/pull/27) ([hunner](https://github.com/hunner))
- Add the ability to configure the eyaml file extension [\#25](https://github.com/voxpupuli/puppet-hiera/pull/25) ([awaxa](https://github.com/awaxa))
- Extend template configuration options \(logger and merge\_behavior\) [\#22](https://github.com/voxpupuli/puppet-hiera/pull/22) ([pjfoley](https://github.com/pjfoley))
Expand All @@ -374,7 +367,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 1.0.1 [\#14](https://github.com/voxpupuli/puppet-hiera/pull/14) ([hunner](https://github.com/hunner))
- fixed the README [\#12](https://github.com/voxpupuli/puppet-hiera/pull/12) ([dhgwilliam](https://github.com/dhgwilliam))
- Stop Puppet 3 from squawking about variable access [\#11](https://github.com/voxpupuli/puppet-hiera/pull/11) ([hakamadare](https://github.com/hakamadare))

Expand Down Expand Up @@ -427,4 +419,4 @@ These should not affect the functionality of the module.



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '~> 2.5.0', :require => false
gem 'puppetlabs_spec_helper', '~> 2.6.0', :require => false
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
Expand Down Expand Up @@ -57,7 +57,7 @@ group :system_tests do
end

group :release do
gem 'github_changelog_generator', :require => false if RUBY_VERSION >= '2.2.2'
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
gem 'puppet-strings', '~> 1.0', :require => false
Expand Down
27 changes: 27 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ exclude_paths = %w(
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

desc 'Auto-correct puppet-lint offenses'
task 'lint:auto_correct' do
PuppetLint.configuration.fix = true
Rake::Task[:lint].invoke
end

desc 'Run acceptance tests'
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
Expand All @@ -48,6 +54,27 @@ task test_with_coveralls: [:test] do
end
end

desc "Print supported beaker sets"
task 'beaker_sets', [:directory] do |t, args|
directory = args[:directory]

metadata = JSON.load(File.read('metadata.json'))

(metadata['operatingsystem_support'] || []).each do |os|
(os['operatingsystemrelease'] || []).each do |release|
if directory
beaker_set = "#{directory}/#{os['operatingsystem'].downcase}-#{release}"
else
beaker_set = "#{os['operatingsystem'].downcase}-#{release}-x64"
end

filename = "spec/acceptance/nodesets/#{beaker_set}.yml"

puts beaker_set if File.exists? filename
end
end
end

begin
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
Expand Down
12 changes: 8 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@
false => $eyaml_datadir,
true => $datadir,
}
# the requested_backends has a side affect in that the eyaml will always be
# first for backend lookups. This can be fixed by specifing the order in
# the backends parameter ie. ['yaml', 'eyaml', 'redis']
$requested_backends = unique(concat(['eyaml'], $backends))

# if eyaml is present in $backends, preserve its location!
if ( 'eyaml' in $backends ) {
$requested_backends = $backends
} else {
$requested_backends = unique(concat(['eyaml'], $backends))
}

} else {
$requested_backends = $backends
$eyaml_real_datadir = undef
Expand Down
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.3.1",
"version": "3.3.2",
"author": "Vox Pupuli",
"summary": "Deploy hiera.yaml with hierarchy, and datadir",
"license": "Apache-2.0",
Expand Down Expand Up @@ -53,7 +53,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.7.1 < 6.0.0"
"version_requirement": ">= 4.10.0 < 6.0.0"
}
]
}
2 changes: 2 additions & 0 deletions spec/acceptance/nodesets/docker/ubuntu-16.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ HOSTS:
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'systemctl mask getty@tty1.service getty-static.service'
- 'apt-get install -y net-tools wget locales apt-transport-https'
- 'locale-gen en_US.UTF-8'
- 'echo LANG=en_US.UTF-8 > /etc/default/locale'
CONFIG:
trace_limit: 200
masterless: true
Expand Down
2 changes: 0 additions & 2 deletions spec/acceptance/nodesets/fedora-25-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
#
# platform is fedora 24 because there is no
# puppet-agent for fedora 25 by 2016-12-30
HOSTS:
fedora-25-x64:
roles:
Expand Down
16 changes: 16 additions & 0 deletions spec/acceptance/nodesets/fedora-26-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
#
HOSTS:
fedora-26-x64:
roles:
- master
platform: fedora-26-x86_64
box: fedora/26-cloud-base
hypervisor: vagrant
CONFIG:
type: aio
...
# vim: syntax=yaml
18 changes: 18 additions & 0 deletions spec/acceptance/nodesets/fedora-27-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
#
# platform is fedora 26 because there is no puppet-agent
# for fedora 27 as of 2017-11-17
HOSTS:
fedora-27-x64:
roles:
- master
platform: fedora-26-x86_64
box: fedora/27-cloud-base
hypervisor: vagrant
CONFIG:
type: aio
...
# vim: syntax=yaml
4 changes: 2 additions & 2 deletions spec/classes/hiera_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

it 'include backends' do
backends = YAML.load(content)[:backends]
expect(backends).to eq(%w[eyaml yaml json yamll])
expect(backends).to eq(%w[yaml eyaml json yamll])
end
it 'include json backend' do
backend = YAML.load(content)[:json]
Expand Down Expand Up @@ -387,7 +387,7 @@

it 'include backends' do
backends = YAML.load(content)[:backends]
expect(backends).to eq(%w[eyaml yaml json yamll])
expect(backends).to eq(%w[yaml eyaml json yamll])
end
it 'include json backend' do
backend = YAML.load(content)[:json]
Expand Down