Created
June 30, 2010 08:27
-
-
Save bonyiii/458396 to your computer and use it in GitHub Desktop.
node.recipe? in chef 0.9 (hun)
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
# Így lehet a 0.9 -ben ellenőrzini, hogy az adott recepet szerepel -e a node run_list -jében. | |
node.run_list.include?("monit") | |
# Ha van egy receptem amiben attól függően akarok valamit csinálni, hogy egy másik recepet installálva van -e vagy sem | |
# akkor a fenti szintakszissal ellenőrizhetem le, hogy az recept le fog -e futni. | |
# rövidebben | |
if node.run_list?(monit") | |
monit_check "syslog-ng" | |
end | |
# hosszsabban, Pl: (syslog-ng receptben) | |
if node.run_list.include?("monit") | |
monit_check "syslog-ng" | |
end | |
# Ha a monit erre a node -ra installálva lesz akkor futtassuk le a monit_check -et "syslog-ng" paraméterrel. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment