cookbooks/mu-tools/recipes/gcloud.rb in cloud-mu-3.0.0beta vs cookbooks/mu-tools/recipes/gcloud.rb in cloud-mu-3.0.0
- old
+ new
@@ -39,10 +39,17 @@
end
bash "install gcloud-cli" do
cwd "/opt"
code <<-EOH
tar -xzf #{Chef::Config[:file_cache_path]}/gcloud-cli.tar.gz
- CLOUDSDK_PYTHON="`/bin/rpm -ql muthon | grep '/bin/python$'`" ./google-cloud-sdk/install.sh -q
+ if [ -f /opt/rh/python27/root/usr/bin/python ];then
+ if [ ! -f /etc/ld.so.conf.d/python27.conf ];then
+ echo "/opt/rh/python27/root/usr/lib64" > /etc/ld.so.conf.d/python27.conf
+ echo "/opt/rh/python27/root/usr/lib" >> /etc/ld.so.conf.d/python27.conf
+ /sbin/ldconfig
+ fi
+ fi
+ CLOUDSDK_PYTHON="`/bin/rpm -ql muthon python27-python | grep '/bin/python$'`" ./google-cloud-sdk/install.sh -q
EOH
notifies :create, "remote_file[#{Chef::Config[:file_cache_path]}/gcloud-cli.sh]", :before
notifies :create, "remote_file[#{Chef::Config[:file_cache_path]}/gcloud-cli.tar.gz]", :before
not_if "/opt/google-cloud-sdk/bin/gcloud version | grep 'Google Cloud SDK #{version}'"
end