end
end
+=begin
+ * Item conf example
+ item_conf = {
+ 'vault' => 'concourse',
+ 'name' => 'web',
+ # single password or nested hash password path delimited by slash
+ 'env_context' => false,
+ 'key' => 'password', # real hash path: "/password"
+ # or nested hash password path delimited by slash
+ #'env_context' => true,
+ #'key' => 'hash/path/to/password', # real hash path: "/#{node.chef_environment}/hash/path/to/password"
+ }
+=end
+ def get_vault_item_value(item_conf)
+ chef_gem_chef_vault
+ require 'chef-vault'
+ secret = ChefVault::Item.load(item_conf['vault'], item_conf['name'])
+ secret = secret[node.chef_environment] if item_conf.key?('env_context') && item_conf['env_context'] == true
+ if !item_conf['key'].nil? && !item_conf['key'].empty?
+ item_conf['key'].split('/').each do |elm| secret = secret[elm] end
+ end
+
+ secret
+ end
+
def vault_item_suffix
suffix = \
if !node['ssl_cert']['vault_item_suffix'].nil? && !node['ssl_cert']['vault_item_suffix'].empty?
license 'Apache 2.0'
description 'Installs/Configures ssl_cert'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.3.6'
+version '0.3.7'
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'