Skip to content

Commit

Permalink
prevent restart of Mongo on every custom cookbook run
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoland committed Sep 9, 2015
1 parent 6cecd6b commit 7ce3546
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
5 changes: 3 additions & 2 deletions cookbooks/mongodb/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,14 @@
})
end

execute "enable-mongodb" do
execute "enable mongodb" do
command "rc-update add mongodb default"
action :run
end

execute "/etc/init.d/mongodb restart" do
execute "start mongodb" do
command "/etc/init.d/mongodb restart"
action :run
not_if "/etc/init.d/mongodb status"
end

2 changes: 0 additions & 2 deletions cookbooks/mongodb/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
include_recipe "mongodb::install"
include_recipe "mongodb::configure"
include_recipe "mongodb::backup"
include_recipe "mongodb::start"

if @node[:mongo_replset]
include_recipe "mongodb::replset"
Expand All @@ -35,7 +34,6 @@
include_recipe "mongodb::install"
include_recipe "mongodb::configure"
include_recipe "mongodb::backup"
include_recipe "mongodb::start"
end
end

Expand Down
10 changes: 0 additions & 10 deletions cookbooks/mongodb/recipes/start.rb

This file was deleted.

0 comments on commit 7ce3546

Please sign in to comment.