Module: Chef::Knife::HitoriBase
- Included in:
- HitoriBootstrap, HitoriConfig, HitoriCook, HitoriDataBagDec, HitoriDataBagEnc, HitoriFileDec, HitoriFileEnc, HitoriHello, HitoriKeyCreate, HitoriPrepare
- Defined in:
- lib/chef/knife/hitori_base.rb
Instance Method Summary collapse
Instance Method Details
#update_environment(env) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/chef/knife/hitori_base.rb', line 9 def update_environment(env) Chef::Config[:environment] = nil Chef::Config[:solo_environment] = env %w(data_bag_path settings_path encrypted_data_bag_secret).each do |name| name = name.to_sym tpl_name = "#{name}_tpl".to_sym if Chef::Config[tpl_name] Chef::Config[name] = sprintf(Chef::Config[tpl_name], env) end end end |