Created
April 24, 2016 03:55
-
-
Save akinnard/4921f08f59d582cce83efab65d6254e2 to your computer and use it in GitHub Desktop.
In a chef template, use the recipe runlist in an if statement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if node['recipes'].include? "recipe-name" %> | |
attributes=true | |
<% else %> | |
attribute=false | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The same example would work for roles as well. Just change "node['recipes']" to "node['roles']"