[chef] ChefDK cookbook generator question


Chronological Thread 
  • From: Nick Shemonsky < >
  • To:
  • Subject: [chef] ChefDK cookbook generator question
  • Date: Mon, 16 Feb 2015 11:33:38 -0500

Hey all,

I'm in the midst of creating a custom cookbook generator and would like to set some of the generator options while still allowing them to be overridden when passed in from the command line. Thus far, I've been doing something like this within recipes/cookbook.rb:

context = ChefDK::Generator.context
context.copyright_holder = 'Example, Inc.'

While that works, if I specify -C at the command line, eg. chef generate cookbook test_cookbook -C 'Other, Inc.', I can't override the copyright_holder option set in cookbook.rb. Is there somewhere better to set these options so that any passed from the command line would take precedence without directly modifying the defaults set in chef-dk/lib/chef-dk/command/generator_commands.rb?

Thanks,
Nick


  • [chef] ChefDK cookbook generator question, Nick Shemonsky, 02/16/2015

Archive powered by MHonArc 2.6.16.

§