-
-
Save btm/5086184 to your computer and use it in GitHub Desktop.
This file contains 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 the host has ganglia in the run_list, install the mongo plugin | |
# In Chef 11 node.recipe? returns true for the run_list and expanded_runlist (node[:recipes]) | |
# In Chef 10 node.recipe? returns true for the run_list and already loaded recipes (seen_recipes) | |
# -- I believe on Chef 10 node.recipe? does not evaluated the expanded run_list so you want node[:recipes] too | |
if node.recipe?("ganglia::default") or node[:recipes].include?("ganglia::default") | |
# Make sure we've already executed the ganglia recipe in this run to get the ganglia_python LWRP | |
include_recipe "ganglia::default" | |
ganglia_python "mongodb" do | |
action :enable | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment