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
When using an encryptor plugin that has options with defaults, things work fine when using eyaml from the command line, any options that are not defined in on the CLI or in .eyaml/config.yaml will continue to have their defaults. Eg: with the vault plugin;
[1] pry(Hiera::Backend::Eyaml::Encryptors::Vault)> options
=> {:addr=>{:desc=>"Address of the vault server", :type=>:string, :default=>"https://127.0.0.1:8200"},
:role_id=>{:desc=>"role_id for the Approle", :type=>:string},
:secret_id=>{:desc=>"secret_id for the Approle", :type=>:string},
:use_ssl=>{:desc=>"Use SSL to connect to vault", :type=>:boolean, :default=>true},
:ssl_verify=>{:desc=>"Verify SSL certs", :type=>:boolean, :default=>true},
:keyname=>{:desc=>"Vault transit key name (default 'hiera')", :type=>:string, :default=>"hiera"},
:api_version=>{:desc=>"API version to use", :type=>:integer, :default=>1}}
[2] pry(Hiera::Backend::Eyaml::Encryptors::Vault)> option :use_ssl
=> true
However, when using Puppet/Hiera, it seems to only see the options specifically configured in the hiera.yaml options: hash and any non defined configuration options get dropped and the defaults are not used.... the above test when using Hiera (and use_ssl being absent from the options hash) gives me;
Using Puppet 6.8.1 with hiera-yaml 3.0.0.
When using an encryptor plugin that has options with defaults, things work fine when using eyaml from the command line, any options that are not defined in on the CLI or in .eyaml/config.yaml will continue to have their defaults. Eg: with the vault plugin;
However, when using Puppet/Hiera, it seems to only see the options specifically configured in the hiera.yaml
options:
hash and any non defined configuration options get dropped and the defaults are not used.... the above test when using Hiera (anduse_ssl
being absent from the options hash) gives me;This means that I have to specify all options for an encryptor plugin in hiera.yaml as the defaults will not work.
Im not sure if this is an issue with eyaml or with the Puppet function that integrates with it, I suspect it could be something to do with;
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/functions/eyaml_lookup_key.rb#L87
But Im hitting roadblocks trying to test this
The text was updated successfully, but these errors were encountered: