You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't seem to be able to get this to work. I read the earlier bug report but that didn't seem to solve my problems.
I changed the owner of /etc/puppet/gpgdata to puppet and made sure the permissions are 750 on the directory and 640 on all files inside.
When I execute hiera -d -c hiera.yaml mysql:server:root_passwd either as root or puppet I get the correct value back:
/etc/puppet$ sudo hiera -d -c hiera.yaml mysql:server:root_passwd
DEBUG: Wed May 08 21:34:11 +0000 2013: Hiera YAML backend starting
DEBUG: Wed May 08 21:34:11 +0000 2013: Looking up mysql:server:root_passwd in YAML backend
DEBUG: Wed May 08 21:34:11 +0000 2013: Looking for data source passwords
DEBUG: Wed May 08 21:34:11 +0000 2013: Data retrieved from /etc/puppet/hieradata/passwords.yaml is not a Hash, setting defaults
DEBUG: Wed May 08 21:34:11 +0000 2013: Looking for data source common
DEBUG: Wed May 08 21:34:11 +0000 2013: Data retrieved from /etc/puppet/hieradata/common.yaml is not a Hash, setting defaults
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: Loaded gpg_backend
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: Lookup called, key mysql:server:root_passwd resolution type is priority
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: GNUPGHOME is /etc/puppet/gpgdata
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: loaded cipher: /etc/puppet/hieradata/gpgdata/passwords.gpg
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: result is a String ctx #<GPGME::Ctx:0x7fbe72436df8> txt ---
mysql:server:root_passwd: jona123
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: GPG decrypt returned valid data
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: Data contains valid YAML
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: Key mysql:server:root_passwd found in YAML document, Passing answer to hiera
DEBUG: Wed May 08 21:34:11 +0000 2013: [gpg_backend]: Assigning answer variable
jona123
Whenever I try to run this through the puppet agent it fails:
...
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error NoMethodError: undefined method `empty?' for #<Puppet::Util::Log:0x7fefea8fe558> at /etc/puppet/manifests/site.pp:18 on node ip-10-250-6-39.us-west-2.compute.internal
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Debug: Value of 'preferred_serialization_format' (pson) is invalid for report, using default (b64_zlib_yaml)
Debug: report supports formats: b64_zlib_yaml raw yaml; using b64_zlib_yaml
I'm wondering if I'm even installing this correctly. I used gem install hiera-gpg. I can see it and the hiera gem fine in the /var/lig/gems directory. But I'm suspecting that puppet is using it's own hiera version in /usr/lib/ruby/vendor_ruby ?! Which would explain the issues I'm seeing.
Hey,
Don't seem to be able to get this to work. I read the earlier bug report but that didn't seem to solve my problems.
I changed the owner of /etc/puppet/gpgdata to puppet and made sure the permissions are 750 on the directory and 640 on all files inside.
When I execute
hiera -d -c hiera.yaml mysql:server:root_passwd
either as root or puppet I get the correct value back:Whenever I try to run this through the puppet agent it fails:
I'm wondering if I'm even installing this correctly. I used
gem install hiera-gpg
. I can see it and the hiera gem fine in the /var/lig/gems directory. But I'm suspecting that puppet is using it's own hiera version in /usr/lib/ruby/vendor_ruby ?! Which would explain the issues I'm seeing.Some more information:
hiera.yaml:
The call to hiera is in manifests/site.pp:
All my setup can be found here: https://github.com/berndmweber/open-source-puppet-master/tree/master/modules/puppet
Any feedback is appreciated!
The text was updated successfully, but these errors were encountered: