--- /dev/null
+#
+# Copyright 2017 whitestar
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# for ver. 3.x
+#source 'https://gpm00.grid.example.com:6280'
+source 'https://supermarket.chef.io'
+
+metadata
# lxcs CHANGELOG
+0.1.6
+-----
+- adds the `ssl_cert` cookbook dependency.
+
0.1.5
-----
- bug fix: LXD profile and network management.
license 'Apache 2.0'
description 'Installs/Configures LinuxContainers.org products'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.5'
+version '0.1.6'
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'
supports 'ubuntu', '>= 16.04'
depends 'platform_utils', '>= 0.3.1'
+depends 'ssl_cert', '>= 0.3.7'
# limitations under the License.
#
+::Chef::Recipe.send(:include, SSLCert::Helper)
+
lxd_conf = node['lxcs']['lxd']
# Note: LXD itself does not require this directory.
item_conf = lxd_conf['init']['trust_password_vault_item']
unless item_conf.empty?
- require 'chef-vault'
- secret = ChefVault::Item.load(item_conf['vault'], item_conf['name'])
- if item_conf.key?('env_context') && item_conf['env_context'] == true
- secret = secret[node.chef_environment]
- end
- if !item_conf['key'].nil? && !item_conf['key'].empty?
- item_conf['key'].split('/').each {|elm|
- secret = secret[elm]
- }
- end
-
+ secret = get_vault_item_value(item_conf)
opts += " --trust-password #{secret}"
end