Pass value to cookbook?

Hi,

What is the chef-onic(-ish?) way to pass something to cookbook.

Essentially I’m writing istallation package for cluster software and while
one leg of cluster is the one I’ll run cookbook against, I have to provide
the other one/ones.

I know the opportunity to make it via databags. Is this a way to go?
Anything native for such purposes?

Thanks

Greg

On 2/23/2015 4:17 AM, gregory grey wrote:

What is the chef-onic(-ish?) way to pass something to cookbook.

Essentially I'm writing istallation package for cluster software and
while one leg of cluster is the one I'll run cookbook against, I have to
provide the other one/ones.

I know the opportunity to make it via databags. Is this a way to go?
Anything native for such purposes?

Hi Greg,

If you're looking to share data between recipes:

  1. You could store the information in node.run_state (a few examples
    here:
    ruby - How to store array in node object chef? - Stack Overflow).
    node.run_state is not saved back to the node object at the end of the
    chef run.

  2. You could use data bags.

  3. ???

--
Jeff Blaine
kickflop.net
PGP/GnuPG Key ID: 0x0C8EDD02