Passing variables between recipes?

I’m sure that this must be an FAQ but I can’t really find the answer.

I am working with an application-cookbook/wrapper-cookbook pattern. Usually, in this pattern the wrapper cookbook sets up some attributes, and then calls the application cookbook to do the work.

In my case, I do not want to use attributes to pass the data from the wrapper to the application cookbook. Specifically, I dont’ want the data to be saved in the node (the data in question is the password to a MySQL database).

I also would like to avoid using a data bag simply because it seems like code smell. Only the wrapper cookbook should “know” where the data is coming from.

What are my options?

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html

You can use the node.run_state and store a hash in there.

cheers,

--aj

On Fri, Dec 19, 2014 at 9:31 PM, Kevin Keane Subscription
subscription@kkeane.com wrote:

I'm sure that this must be an FAQ but I can't really find the answer.

I am working with an application-cookbook/wrapper-cookbook pattern. Usually,
in this pattern the wrapper cookbook sets up some attributes, and then calls
the application cookbook to do the work.

In my case, I do not want to use attributes to pass the data from the
wrapper to the application cookbook. Specifically, I dont' want the data to
be saved in the node (the data in question is the password to a MySQL
database).

I also would like to avoid using a data bag simply because it seems like
code smell. Only the wrapper cookbook should "know" where the data is coming
from.

What are my options?

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html

Data bag actually has facility to code password etc. So it will not be reviled.
And it can be easily accessed from any node. And data is being saved only on Chef server side.

— Оригінальне повідомлення —
Від кого: “Kevin Keane Subscription” subscription@kkeane.com
Дата: 19 грудня 2014, 10:32:46

I’m sure that this must be an FAQ but I can’t really find the answer.

I am working with an application-cookbook/wrapper-cookbook pattern. Usually, in this pattern the wrapper cookbook sets up some attributes, and then calls the application cookbook to do the work.

In my case, I do not want to use attributes to pass the data from the wrapper to the application cookbook. Specifically, I dont’ want the data to be saved in the node (the data in question is the password to a MySQL database).

I also would like to avoid using a data bag simply because it seems like code smell. Only the wrapper cookbook should “know” where the data is coming from.

What are my options?

Kevin Keane The NetTech http://www.4nettech.com Our values: Privacy, Liberty, Justice See https://www.4nettech.com/corp/the-nettech-values.html

Use data bag but encrypt it.

Regards,
Anjaneya Raju.E
[cid:image001.jpg@01CED4A1.D69F4B70]http://www.techmahindra.com/

From: klum_tz@ukr.net [mailto:klum_tz@ukr.net]
Sent: Friday, December 19, 2014 2:23 PM
To: chef@lists.opscode.com
Cc: chef@lists.opscode.com; chef@lists.opscode.com
Subject: [chef] Re: Passing variables between recipes?

Data bag actually has facility to code password etc.
So it will not be reviled.

And it can be easily accessed from any node. And data is being saved only on Chef server side.
— Оригінальне повідомлення —
Від кого: “Kevin Keane Subscription” <subscription@kkeane.commailto:subscription@kkeane.com>
Дата: 19 грудня 2014, 10:32:46

I’m sure that this must be an FAQ but I can’t really find the answer.

I am working with an application-cookbook/wrapper-cookbook pattern. Usually, in this pattern the wrapper cookbook sets up some attributes, and then calls the application cookbook to do the work.

In my case, I do not want to use attributes to pass the data from the wrapper to the application cookbook. Specifically, I dont’ want the data to be saved in the node (the data in question is the password to a MySQL database).

I also would like to avoid using a data bag simply because it seems like code smell. Only the wrapper cookbook should “know” where the data is coming from.

What are my options?

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html