hunner/puppet-hiera — pull request #43 by smbambling (2014-12-15 19:21:10+00:00)
Title: Eyaml gpg

Add the ability to install/configure hiera-eyaml-gpg.
* Configures needed hiera.yaml properties
* Installs needed gems

Note: Added puppetlabs/ruby dep as its the ruby-devel package is needed so it installs it

There is an oddity that if the pkcs7 keys for hiera-eyaml-gpg need created AND the hiera-eyaml-gpg gem is already installed it fails to create the keys and the run reports back failed. To compensate for this I have a exec that will remove the hiera-eyaml-gpg ONLY if the pkcs7 keys have not been generated. This lead to the potential for the hiera-eyaml-gpg gem to not be installed on a single run but will be install on the next puppet run. I don't see this as being something that is run into often.

Example Usage

class { 'hiera':
hierarchy => [
'nodes/%{::clientcert}',
'locations/%{::location}',
'environments/%{::applicationtier}',
'common',
],
logger => 'console',
eyaml => true,
eyaml_gpg => true,
eyaml_gpg_keygen => true,
eyaml_gpg_recipients => 'sihil@example.com,gtmtech@example.com,tpoulton@example.com',
}