RE: Extracting the nodes in an environment that contain a particular cookbook


#1

Several different ways to accomplish what you say. Which one is best depends on your situation. It’s actually a fairly common scenario.

Usually, a search is the answer. Please be careful about whether you want to only find the cookbook in the run list, or also a cookbook that might be included in another cookbook.

In some contexts, another way to do this is to have the cookbook you are looking for set an attribute on the node, and later search for that attribute.

Yet another way is to have this cookbook register itself with some external service-discovery tool, if you are using that in your enviornment.

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

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

-----Original message-----
From: ANGELA EBIRIM aebirim@icloud.com
Sent: Tuesday 15th September 2015 11:05
To: chef@lists.opscode.com
Subject: [chef] Extracting the nodes in an environment that contain a particular cookbook

Hello,

I’m hoping that someone could assist me.

I’ve got a situation in that I’m trying to find the nodes in an environment that contain a particular cookbook in it’s run list.

How would I do this without using knife? I’m going to put it into a recipe.

Many thanks

Sent from iCloud


#2

In some contexts, another way to do this is to have the cookbook you are
looking for set an attribute on the node, and later search for that
attribute.

Simple workaround and a LOT easier to implement.

On Tue, Sep 15, 2015 at 2:44 PM, Kevin Keane Subscription <
subscription@kkeane.com> wrote:

Several different ways to accomplish what you say. Which one is best
depends on your situation. It’s actually a fairly common scenario.

Usually, a search is the answer. Please be careful about whether you want
to only find the cookbook in the run list, or also a cookbook that might be
included in another cookbook.

In some contexts, another way to do this is to have the cookbook you are
looking for set an attribute on the node, and later search for that
attribute.

Yet another way is to have this cookbook register itself with some
external service-discovery tool, if you are using that in your enviornment.

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

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

-----Original message-----
From: ANGELA EBIRIM aebirim@icloud.com
Sent: Tuesday 15th September 2015 11:05
To: chef@lists.opscode.com
Subject: [chef] Extracting the nodes in an environment that contain a
particular cookbook

Hello,

I’m hoping that someone could assist me.

I’ve got a situation in that I’m trying to find the nodes in an
environment that contain a particular cookbook in it’s run list.

How would I do this without using knife? I’m going to put it into a recipe.

Many thanks

Sent from iCloud