Skip to content

Commit

Permalink
Merge branch 'master' into rnelson0-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoneycutt authored Nov 28, 2019
2 parents 8d54891 + 1cbe942 commit e179dd4
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 78 deletions.
23 changes: 19 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,34 @@ You can install all needed gems for spec tests into the modules directory by
running:

```sh
bundle install --path .vendor/ --without development system_tests release
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
```

If you also want to run acceptance tests:

```sh
bundle install --path .vendor/ --with system_tests --without development release
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
```

Our all in one solution if you don't know if you need to install or update gems:

```sh
bundle install --path .vendor/ --with system_tests --without development release; bundle update; bundle clean
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
```

As an alternative to the `--jobs "$(nproc)` parameter, you can set an
environment variable:

```sh
BUNDLE_JOBS="$(nproc)"
```

### Note for OS X users

`nproc` isn't a valid command unter OS x. As an alternative, you can do:

```sh
--jobs "$(sysctl -n hw.ncpu)"
```

## Syntax and style
Expand Down Expand Up @@ -160,7 +175,7 @@ created virtual machines will be in `.vagrant/beaker_vagrant_files`.
Beaker also supports docker containers. We also use that in our automated CI
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:

```
```sh
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
```

Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '2.7.0'
modulesync_config_version: '2.8.0'
33 changes: 29 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ 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.

## [v4.0.0](https://github.com/voxpupuli/puppet-hiera/tree/v4.0.0) (2019-11-27)

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

**Breaking changes:**

- drop Ubuntu 14.04 support [\#273](https://github.com/voxpupuli/puppet-hiera/pull/273) ([bastelfreak](https://github.com/bastelfreak))
- modulesync 2.7.0 and drop puppet 4 [\#249](https://github.com/voxpupuli/puppet-hiera/pull/249) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- hiera.yaml is word readable. Allow setting different permissions to hide secrets [\#266](https://github.com/voxpupuli/puppet-hiera/pull/266) ([maxadamo](https://github.com/maxadamo))

**Closed issues:**

- hiera.yaml is word readable, but it can contain secret tokens [\#265](https://github.com/voxpupuli/puppet-hiera/issues/265)
- Incompatible with Puppet-6 [\#263](https://github.com/voxpupuli/puppet-hiera/issues/263)
- Cannot install deep\_merge gem. [\#252](https://github.com/voxpupuli/puppet-hiera/issues/252)

**Merged pull requests:**

- allow puppetlabs/inifile 4.x [\#274](https://github.com/voxpupuli/puppet-hiera/pull/274) ([bastelfreak](https://github.com/bastelfreak))
- Clean up acceptance spec helper [\#272](https://github.com/voxpupuli/puppet-hiera/pull/272) ([ekohl](https://github.com/ekohl))
- Format options value as json if it is a hash [\#270](https://github.com/voxpupuli/puppet-hiera/pull/270) ([ZeroPointEnergy](https://github.com/ZeroPointEnergy))
- Allow `puppetlabs/stdlib` 6.x [\#262](https://github.com/voxpupuli/puppet-hiera/pull/262) ([alexjfisher](https://github.com/alexjfisher))

## [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)
Expand All @@ -18,6 +44,7 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 3.4.1 [\#261](https://github.com/voxpupuli/puppet-hiera/pull/261) ([rnelson0](https://github.com/rnelson0))
- 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)
Expand Down Expand Up @@ -53,7 +80,6 @@ These should not affect the functionality of the module.

- allow puppetlabs/stdlib 5.x [\#231](https://github.com/voxpupuli/puppet-hiera/pull/231) ([bastelfreak](https://github.com/bastelfreak))
- allow puppetlabs/inifile 2.x [\#228](https://github.com/voxpupuli/puppet-hiera/pull/228) ([bastelfreak](https://github.com/bastelfreak))
- Remove docker nodesets [\#223](https://github.com/voxpupuli/puppet-hiera/pull/223) ([bastelfreak](https://github.com/bastelfreak))
- drop EOL OSs; fix puppet version range [\#222](https://github.com/voxpupuli/puppet-hiera/pull/222) ([bastelfreak](https://github.com/bastelfreak))

## [v3.3.2](https://github.com/voxpupuli/puppet-hiera/tree/v3.3.2) (2018-03-28)
Expand All @@ -66,6 +92,7 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Remove docker nodesets [\#223](https://github.com/voxpupuli/puppet-hiera/pull/223) ([bastelfreak](https://github.com/bastelfreak))
- 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)
Expand All @@ -90,7 +117,7 @@ These should not affect the functionality of the module.

**Implemented enhancements:**

- Add datadir key for hiera5 hierarchy. [\#204](https://github.com/voxpupuli/puppet-hiera/pull/204) ([disappear89](https://github.com/disappear89))
- Add datadir key for hiera5 hierarchy. [\#204](https://github.com/voxpupuli/puppet-hiera/pull/204) ([ThoTischner](https://github.com/ThoTischner))

**Closed issues:**

Expand Down Expand Up @@ -214,9 +241,7 @@ These should not affect the functionality of the module.

- Relicense BSD-2-Clause to Apache-2.0 [\#149](https://github.com/voxpupuli/puppet-hiera/pull/149) ([hunner](https://github.com/hunner))
- Modulesync 0.12.2 & Release 2.1.1 [\#148](https://github.com/voxpupuli/puppet-hiera/pull/148) ([bastelfreak](https://github.com/bastelfreak))
- modulesync 0.11.1 [\#145](https://github.com/voxpupuli/puppet-hiera/pull/145) ([bastelfreak](https://github.com/bastelfreak))
- module is compatible with PE2016.2 [\#144](https://github.com/voxpupuli/puppet-hiera/pull/144) ([vchepkov](https://github.com/vchepkov))
- modulesync 0.11.0 [\#143](https://github.com/voxpupuli/puppet-hiera/pull/143) ([bastelfreak](https://github.com/bastelfreak))
- Update metadata.json to not give dependency errors in puppet3.8 [\#142](https://github.com/voxpupuli/puppet-hiera/pull/142) ([cryptk](https://github.com/cryptk))
- modulesync 0.8.0 [\#139](https://github.com/voxpupuli/puppet-hiera/pull/139) ([bastelfreak](https://github.com/bastelfreak))
- modulesync 0.6.2 [\#137](https://github.com/voxpupuli/puppet-hiera/pull/137) ([bastelfreak](https://github.com/bastelfreak))
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ group :test do
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'puppet-lint-absolute_classname-check', :require => false
gem 'puppet-lint-topscope-variable-check', :require => false
gem 'metadata-json-lint', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false
Expand Down
10 changes: 5 additions & 5 deletions manifests/deep_merge.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
# Copyright (C) 2016 Joseph Yaworski, unless otherwise noted.
#
class hiera::deep_merge {
$provider = $::hiera::provider
$deep_merge_version = $::hiera::deep_merge_version
$deep_merge_source = $::hiera::deep_merge_source
$deep_merge_name = $::hiera::deep_merge_name
$manage_package = $::hiera::manage_deep_merge_package
$provider = $hiera::provider
$deep_merge_version = $hiera::deep_merge_version
$deep_merge_source = $hiera::deep_merge_source
$deep_merge_name = $hiera::deep_merge_name
$manage_package = $hiera::manage_deep_merge_package

if $manage_package {
::hiera::install { 'deep_merge':
Expand Down
22 changes: 11 additions & 11 deletions manifests/eyaml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
# Copyright (C) 2014 Terri Haber, unless otherwise noted.
#
class hiera::eyaml {
$eyaml_name = $::hiera::eyaml_name
$provider = $::hiera::provider
$eyaml_version = $::hiera::eyaml_version
$eyaml_source = $::hiera::_eyaml_source
$eyaml_name = $hiera::eyaml_name
$provider = $hiera::provider
$eyaml_version = $hiera::eyaml_version
$eyaml_source = $hiera::_eyaml_source

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

$manage_package = $::hiera::manage_eyaml_package
$manage_package = $hiera::manage_eyaml_package

if $manage_package {
::hiera::install { 'eyaml':
Expand Down
24 changes: 12 additions & 12 deletions manifests/eyaml_gpg.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
# This calls install and configures hiera-eyaml-gpg
#
class hiera::eyaml_gpg {
$provider = $::hiera::provider
$eyaml_gpg_name = $::hiera::eyaml_gpg_name
$eyaml_gpg_version = $::hiera::eyaml_gpg_version
$eyaml_gpg_source = $::hiera::_eyaml_gpg_source
$provider = $hiera::provider
$eyaml_gpg_name = $hiera::eyaml_gpg_name
$eyaml_gpg_version = $hiera::eyaml_gpg_version
$eyaml_gpg_source = $hiera::_eyaml_gpg_source

$ruby_gpg_name = $::hiera::ruby_gpg_name
$ruby_gpg_version = $::hiera::ruby_gpg_version
$ruby_gpg_source = $::hiera::ruby_gpg_source
$ruby_gpg_name = $hiera::ruby_gpg_name
$ruby_gpg_version = $hiera::ruby_gpg_version
$ruby_gpg_source = $hiera::ruby_gpg_source

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

$manage_package = $::hiera::manage_eyaml_gpg_package
$manage_package = $hiera::manage_eyaml_gpg_package

require hiera::eyaml

Expand Down
35 changes: 18 additions & 17 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,31 @@
# Copyright (C) 2016 Vox Pupuli, unless otherwise noted.
#
class hiera (
Variant[Array, Array[Hash]] $hierarchy = $::hiera::params::hierarchy,
Optional[Enum['3','5']] $hiera_version = $::hiera::params::hiera_version,
Hiera::Hiera5_defaults $hiera5_defaults = $::hiera::params::hiera5_defaults,
Variant[Array, Array[Hash]] $hierarchy = $hiera::params::hierarchy,
Optional[Enum['3','5']] $hiera_version = $hiera::params::hiera_version,
Hiera::Hiera5_defaults $hiera5_defaults = $hiera::params::hiera5_defaults,
$backends = ['yaml'],
$backend_options = {},
$hiera_yaml = $::hiera::params::hiera_yaml,
$hiera_yaml = $hiera::params::hiera_yaml,
$create_symlink = true,
$datadir = $::hiera::params::datadir,
$datadir = $hiera::params::datadir,
$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,
$owner = $hiera::params::owner,
$group = $hiera::params::group,
$mode = $hiera::params::mode,
$eyaml_owner = $hiera::params::eyaml_owner,
$eyaml_group = $hiera::params::eyaml_group,
$provider = $hiera::params::provider,
$eyaml = false,
$eyaml_name = 'hiera-eyaml',
$eyaml_version = undef,
$eyaml_source = undef,
$eyaml_datadir = undef,
$eyaml_extension = undef,
$confdir = $::hiera::params::confdir,
$confdir = $hiera::params::confdir,
$puppet_conf_manage = true,
$logger = 'console',
$cmdpath = $::hiera::params::cmdpath,
$cmdpath = $hiera::params::cmdpath,
$create_keys = true,
$keysdir = undef,
$deep_merge_name = 'deep_merge',
Expand All @@ -87,13 +88,13 @@
$deep_merge_options = {},
$merge_behavior = undef,
$extra_config = '',
$master_service = $::hiera::params::master_service,
$manage_package = $::hiera::params::manage_package,
$master_service = $hiera::params::master_service,
$manage_package = $hiera::params::manage_package,
Boolean $manage_eyaml_package = true,
Boolean $manage_deep_merge_package = true,
Boolean $manage_eyaml_gpg_package = true,
$package_name = $::hiera::params::package_name,
$package_ensure = $::hiera::params::package_ensure,
$package_name = $hiera::params::package_name,
$package_ensure = $hiera::params::package_ensure,
$eyaml_gpg_name = 'hiera-eyaml-gpg',
$eyaml_gpg_version = undef,
$eyaml_gpg_source = undef,
Expand Down Expand Up @@ -144,7 +145,7 @@
File {
owner => $owner,
group => $group,
mode => '0644',
mode => $mode,
}

if ($datadir !~ /%\{.*\}/) and ($datadir_manage == true) {
Expand Down
4 changes: 2 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$provider,
$gem_version = undef,
$gem_source = undef,
$gem_install_options = $::hiera::gem_install_options,
$gem_install_options = $hiera::gem_install_options,
) {

# $gem_install_options is typically used for specifying a proxy
Expand Down Expand Up @@ -37,7 +37,7 @@
}
$master_subscribe = Package[$gem_name]
}
Service <| title == $::hiera::master_service |> {
Service <| title == $hiera::master_service |> {
subscribe +> $master_subscribe,
}
}
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$package_ensure = 'present'
$package_name = 'hiera'
$hierarchy = []
$mode = '0644'
# Configure for AIO packaging.
if $facts['pe_server_version'] {
$master_service = 'pe-puppetserver'
Expand Down
7 changes: 3 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-hiera",
"version": "3.4.2-rc0",
"version": "4.0.1-rc0",
"author": "Vox Pupuli",
"summary": "Deploy hiera.yaml with hierarchy, and datadir",
"license": "Apache-2.0",
Expand All @@ -14,11 +14,11 @@
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 1.4.1 < 4.0.0"
"version_requirement": ">= 1.4.1 < 5.0.0"
},
{
"name": "puppetlabs/puppetserver_gem",
"version:requirement": ">= 1.0.0"
"version:requirement": ">= 1.0.0 < 2.0.0"
}
],
"operatingsystem_support": [
Expand All @@ -45,7 +45,6 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04"
]
}
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/hiera_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class { 'hiera':
eyaml => true,
merge_behavior => 'deep',
puppet_conf_manage => true,
mode => '0640',
hierarchy => [
'virtual/%{::virtual}',
'nodes/%{::trusted.certname}',
Expand Down
Loading

0 comments on commit e179dd4

Please sign in to comment.