[chef] Re: How to validate attribute before recipe is being executed?


Chronological Thread 
  • From: Booker Bense < >
  • To:
  • Subject: [chef] Re: How to validate attribute before recipe is being executed?
  • Date: Wed, 13 Mar 2013 08:27:06 -0700


On Wed, Mar 13, 2013 at 8:18 AM, howard chen < " target="_blank"> > wrote:
For some attributes, our use case is it must be overrided by user, and
it need to follow our validation scheme, e.g. must be an integer <
100, is it possible to validate it before the recipe is being
executed?

Where/how is the user going to enter the data to override the attribute? If I was to implement this[a], I would
pick one of two strategies. 

1. Put data in local file on the node, write an ohai plugin to read the file and validate the attribute. 

2. Put the data in a databag, and have some gateway process validate the entry before it gets put in 
the databag. 

- Booker C. Bense 

[a]- I have not implemented it yet, but it's definitely on the to do list... 



Archive powered by MHonArc 2.6.16.

§