[chef] Re: have different required attributes fro different actions on a resource


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Cc: Medya < >
  • Subject: [chef] Re: have different required attributes fro different actions on a resource
  • Date: Mon, 16 Feb 2015 11:46:43 -0800

On 2/16/15 11:13 AM, Medya wrote:
how can I make it a resource, so that :

    if the action is install, the install_dir attribute be required,

    and if the action is patch, the patch_id attribute be required ?

Probably in the after_created hook in the resource:

https://github.com/chef/chef/blob/master/lib/chef/resource/remote_file.rb#L128-L130




Archive powered by MHonArc 2.6.16.

§