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.
-----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.
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.
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.
-----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.