updating file using 'file' chef-solo resource
i am trying to install java using chef-solo . The problem is to set the JAVA_HOME and PATH variables in /etc/profile file. I tried using 'file' resource provided by chef. here is some of my code: java_home = "export JAVA_HOME=/usr/lib/java/jdk1.7.0_05" path = "export PATH=$PATH:/usr/lib/java/jdk1.7.0_05/bin" execute "make_dir" do cwd "/usr/lib/" user "root" command "mkdir java" end execute "copy" do cwd "/usr/lib/java" user "root" command "cp -r /home/user/Downloads/jdk1* /usr/lib/java" end file "/etc/profile" do owner "root" group "root" action :touch content JAVA_HOME content PATH end but