How can a recipe get a full list of the server tags?
or
How can a recipe check if a certain tag is set/present?
BTW: tagged? didn't work for me
How can a recipe get a full list of the server tags?
or
How can a recipe check if a certain tag is set/present?
BTW: tagged? didn't work for me
There are a couple of things to keep in mind with Chef tags:
Those two things aside, I use them a lot in recipes and they work very well.
if tagged?('legacy')
do legacy things
end
or
return if tagged?('ignore')
Those types of uses should work, no problem, from your recipes.
You can get all the tags of a node in recipe by
node.tags
ornode[:tags]
. So to check, if the certain tag is present, you need to:To get the full list of all the tags on all nodes you have to use search.
But
tagged? 'mytag'
should work actually. Show your code.