Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
davealden committed May 11, 2017
1 parent 76a28b3 commit 3f8c6dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/puppet/functions/hiera_vault.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
begin
require 'json'
rescue LoadError => e
raise Puppet::DataBind::LookupError, "[hiera-vault] Must install json gem to use hiera-vault backend"
raise Puppet::DataBinding::LookupError, "[hiera-vault] Must install json gem to use hiera-vault backend"
end
begin
require 'vault'
rescue LoadError => e
raise Puppet::DataBind::LookupError, "[hiera-vault] Must install vault gem to use hiera-vault backend"
raise Puppet::DataBinding::LookupError, "[hiera-vault] Must install vault gem to use hiera-vault backend"
end

dispatch :lookup_key do
Expand All @@ -32,7 +32,7 @@ def lookup_key(key, options, context)
begin
confine_keys = confine_keys.map { |r| Regexp.new(r) }
rescue StandardError => e
raise Puppet::DataBind::LookupError, "[hiera-vault] creating regexp failed with: #{e}"
raise Puppet::DataBinding::LookupError, "[hiera-vault] creating regexp failed with: #{e}"
end

regex_key_match = Regexp.union(confine_keys)
Expand Down Expand Up @@ -73,13 +73,13 @@ def vault_get(key, options, context)
end

if vault.sys.seal_status.sealed?
raise Puppet::DataBind::LookupError, "[hiera-vault] vault is sealed"
raise Puppet::DataBinding::LookupError, "[hiera-vault] vault is sealed"
end

context.explain { "[hiera-vault] Client configured to connect to #{vault.address}" }
rescue StandardError => e
vault = nil
raise Puppet::DataBind::LookupError, "[hiera-vault] Skipping backend. Configuration error: #{e}"
raise Puppet::DataBinding::LookupError, "[hiera-vault] Skipping backend. Configuration error: #{e}"
end

answer = nil
Expand Down

0 comments on commit 3f8c6dc

Please sign in to comment.