Created
October 14, 2015 17:18
-
-
Save jchodakowski/cc428a8717040fa9ec51 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
mongo = service 'mongod' do | |
action [:enable, :stop] | |
end | |
bash 'back up stock mongod.conf' do | |
code <<-EOH | |
mv /etc/mongod.conf /etc/mongod.conf.orig | |
EOH | |
only_if { File.exist?('/etc/mongod.conf') } | |
end | |
template '/etc/mongod.conf' do | |
source 'mongod-bootstrap.conf.erb' | |
owner 'root' | |
group 'root' | |
mode 00644 | |
end | |
bash 'clean the data path' do | |
code <<-EOH | |
rm -rf "#{node['foo']['mongodb']['datadir']}"/* | |
EOH | |
end | |
mongo = service 'mongod' do | |
action :start | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment