From d029ee91be0feb33f198fa040a1bbad51a420fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Fri, 27 Dec 2019 11:33:05 +0100 Subject: [PATCH] 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 --- .chef/config.rb | 4 ---- config.rb | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 config.rb diff --git a/.chef/config.rb b/.chef/config.rb index 5461d90..96bb67b 100644 --- a/.chef/config.rb +++ b/.chef/config.rb @@ -8,10 +8,6 @@ data_bag_path "data_bags" encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret" local_mode true # Chef local mode, replacing Solo -cookbook_copyright 'Kosmos Developers' -cookbook_license 'MIT' -cookbook_email 'mail@kosmos.org' - # 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[ diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..4a04d5a --- /dev/null +++ b/config.rb @@ -0,0 +1,4 @@ +# Set default values for `chef generate cookbook COOKBOOK_NAME` +chefdk.generator.copyright_holder 'Kosmos Developers' +chefdk.generator.license 'mit' +chefdk.generator.email 'mail@kosmos.org'