1759af98b8
Set the attributes in a Ruby file under /etc/chef/client.d/ instead of editing /etc/chef/client.rb Now uses the new whitelist attribute: https://docs.chef.io/client/19/cookbooks/attributes/attribute_persistence/ Local chef config also uses the same file. That means there is no longer a need to use the sanitize script to remove override and default attributes from nodes.
15 lines
685 B
Ruby
15 lines
685 B
Ruby
current_dir = File.dirname(__FILE__)
|
|
|
|
cookbook_path ["#{current_dir}/../site-cookbooks", "#{current_dir}/../cookbooks"]
|
|
node_path "nodes"
|
|
role_path "roles"
|
|
environment_path "environments"
|
|
data_bag_path "data_bags"
|
|
encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"
|
|
local_mode true # Chef local mode, replacing Solo
|
|
|
|
# Added to /etc/chef/client.rb on node bootstrap
|
|
# https://docs.chef.io/attribute_persistence/
|
|
# Source of truth: site-cookbooks/kosmos-base/files/default/chef_attributes.rb
|
|
client_d_dir(File.expand_path("../site-cookbooks/kosmos-base/files/default/chef_attributes.rb"))
|