diff options
Diffstat (limited to 'lib/chef/resource/chef_vault_secret.rb')
-rw-r--r-- | lib/chef/resource/chef_vault_secret.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/chef/resource/chef_vault_secret.rb b/lib/chef/resource/chef_vault_secret.rb index bbd21ec543..d8a2e89ffe 100644 --- a/lib/chef/resource/chef_vault_secret.rb +++ b/lib/chef/resource/chef_vault_secret.rb @@ -73,19 +73,19 @@ class Chef description: "The Chef environment of the data if storing per environment values." load_current_value do - begin - item = ChefVault::Item.load(data_bag, id) - raw_data item.raw_data - clients item.get_clients - admins item.get_admins - search item.search - rescue ChefVault::Exceptions::SecretDecryption - current_value_does_not_exist! - rescue ChefVault::Exceptions::KeysNotFound - current_value_does_not_exist! - rescue Net::HTTPClientException => e - current_value_does_not_exist! if e.response_code == "404" - end + + item = ChefVault::Item.load(data_bag, id) + raw_data item.raw_data + clients item.get_clients + admins item.get_admins + search item.search + rescue ChefVault::Exceptions::SecretDecryption + current_value_does_not_exist! + rescue ChefVault::Exceptions::KeysNotFound + current_value_does_not_exist! + rescue Net::HTTPClientException => e + current_value_does_not_exist! if e.response_code == "404" + end action :create do |