Skip to content

Instantly share code, notes, and snippets.

@caiush
Created February 25, 2015 16:52
Show Gist options
  • Save caiush/33cc9b8f64812c1d4998 to your computer and use it in GitHub Desktop.
Save caiush/33cc9b8f64812c1d4998 to your computer and use it in GitHub Desktop.
new test for config defs
def get_config(key)
init_config if $dbi.nil?
puts "------------ Fetching value for key \"#{key}\""
result = (node['bcpc']['enabled']['encrypt_data_bag']) ? $edbi[key] : $dbi[key]
raise "No config found for get_config(#{key})!!!" if result.nil?
return result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment