Skip to content

Instantly share code, notes, and snippets.

@saimonmoore
Created March 25, 2011 16:27
Show Gist options
  • Save saimonmoore/887134 to your computer and use it in GitHub Desktop.
Save saimonmoore/887134 to your computer and use it in GitHub Desktop.
e = execute "source system profile" do
user node[:unix_user]
command ". /etc/profile"
action :nothing
end
bash "set ruby enterpise as default ruby" do
user "root"
code <<-EOH
echo "PATH=#{node["ruby_enterprise"]["install_path"]}/bin:$PATH" >> /etc/profile
EOH
not_if "grep #{node["ruby_enterprise"]["install_path"]} /etc/profile"
#notifies :run, resources("execute[source system profile]"), :immediately
end
e.run_action(:run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment