Skip to content

Commit

Permalink
Do not restart mongod instances on every configure run, even if nothi…
Browse files Browse the repository at this point in the history
…ng changed (fixes issue 5)
  • Loading branch information
Markus Korn committed Sep 22, 2011
1 parent 19ed754 commit 93868e5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mongodb/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@
needs_mongo_gem = (node.recipes.include?("mongodb::replicaset") or node.recipes.include?("mongodb::mongos"))

if needs_mongo_gem
# install the mongo ruby gem at compile time to make it globally available
gem_package 'mongo' do
action :nothing
end.run_action(:install)
Gem.clear_paths
end

# configure default instance
mongodb_instance "mongodb" do
mongodb_type "mongod"
port node['mongodb']['port']
logpath node['mongodb']['logpath']
dbpath node['mongodb']['dbpath']
if node.recipes.include?("mongodb::default") or node.recipes.include?("mongodb")
# configure default instance
mongodb_instance "mongodb" do
mongodb_type "mongod"
port node['mongodb']['port']
logpath node['mongodb']['logpath']
dbpath node['mongodb']['dbpath']
end
end

## Firewall configuration ##
Expand Down

0 comments on commit 93868e5

Please sign in to comment.