cookbooks/mu-master/recipes/init.rb in cloud-mu-2.0.1 vs cookbooks/mu-master/recipes/init.rb in cloud-mu-2.0.2
- old
+ new
@@ -290,11 +290,11 @@
yum_package 'ruby23-2.3.1-1.el7.centos.x86_64' do
action :purge
end
execute "Kill ruby-2.3.1" do
- command "yum erase ruby23-2.3.1-1.el7.centos.x86_64 -y"
+ command "yum erase ruby23-2.3.1-1.el7.centos.x86_64 -y; rpm -e ruby23"
only_if { ::Dir.exist?("/opt/rubies/ruby-2.3.1") }
end
execute "clean up old ruby-2.3.1" do
command "rm -rf /opt/rubies/ruby-2.3.1"
@@ -545,9 +545,11 @@
content %Q{export MU_INSTALLDIR="#{MU_BASE}"
export MU_DATADIR="#{MU_BASE}/var"
export PATH="#{MU_BASE}/bin:/usr/local/ruby-current/bin:${PATH}:/opt/opscode/embedded/bin"
}
mode 0644
+ action :create_if_missing
+ not_if { ::File.size?("#{MU_BASE}/etc/mu.rc") }
end
# Community cookbooks keep touching gems, and none of them are smart about our
# default umask. We have to clean up after them every time.
["/usr/local/ruby-current", "/opt/chef/embedded"].each { |rubydir|