Skip to content

Instantly share code, notes, and snippets.

@bonyiii
Created June 30, 2010 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bonyiii/458396 to your computer and use it in GitHub Desktop.
Save bonyiii/458396 to your computer and use it in GitHub Desktop.
node.recipe? in chef 0.9 (hun)
# Í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