chef/.chef/config.rb
Greg Karékinian d029ee91be Move the generate options to config.rb at the root of the repo
This has been the only way I managed to make `chef generate cookbook
COOKBOOK_NAME` set the default values

This is not documented, there is an issue open about it:
https://github.com/chef/chef-cli/issues/54
2019-12-27 11:33:05 +01:00

31 lines
866 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
# Knife-Zero config, see https://knife-zero.github.io/40_configuration/
# Prevent attributes from being saved to the node files
knife[:automatic_attribute_whitelist] = %w[
fqdn
os
os_version
hostname
ipaddress
roles
recipes
ipaddress
platform
platform_version
cloud
cloud_v2
chef_packages
]
knife[:default_attribute_whitelist] = []
knife[:normal_attribute_whitelist] = ['knife_zero']
knife[:override_attribute_whitelist] = []