Skip to content

Instantly share code, notes, and snippets.

@skylerto
Created March 24, 2018 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skylerto/d8c3cb3f6651b7c8da8ceef9e26b6500 to your computer and use it in GitHub Desktop.
Save skylerto/d8c3cb3f6651b7c8da8ceef9e26b6500 to your computer and use it in GitHub Desktop.
Example config.rb for chef
# => .chef/config.rb
# see https://docs.chef.io/config_rb.html
# Chef commands interaction
cookbook_path ['path_to_cookbooks']
# Knife commands will run against local as opposed to a chef server,
# files created on the local as opposed to temp files then upload to chef
# server.
local_mode true
# If we are running the chef generate command set the following options
if File.basename($PROGRAM_NAME).eql?('chef') && ARGV[0].eql?('generate')
chefdk.generator.license = 'all_rights'
chefdk.generator.copyright_holder = 'My Name'
chefdk.generator.email = 'example@example.com'
chefdk.generator_cookbook = 'path_to_generator_cookbook'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment