[chef] recipe executing shell command


Chronological Thread 
  • From: Kelly Goedert < >
  • To:
  • Subject: [chef] recipe executing shell command
  • Date: Tue, 10 Jan 2012 17:13:14 -0200

Hi,

I am trying to create a recipe that will make a silent install of a
jdk1.5. The recipe is like this:

remote_file "#{user_home}/install/jdk-1_5_0_22-linux-amd64.bin" do
        source "http://10.1.1.6/files/jdk-1_5_0_22-linux-amd64.bin";
        owner user_name
    group user_name
        mode "0777"
end

remote_file "#{user_home}/install/answerjdk5" do
        source "http://10.1.1.6/files/answerjdk5";
        owner user_name
    group user_name
        mode "0755"
end

execute "install_jdk5" do
        command "#{user_home}/install/jdk-1_5_0_22-linux-amd64.bin <
#{user_home}/install/answerjdk5 > /dev/null"
        action :run
end



The files are downloaded correctly and if I execute the command
manually it works fine. In the client log, everything seems to be ok.
But the jdk folder is not created.


INFO: Processing
remote_file[/home/mee/install/jdk-1_5_0_22-linux-amd64.bin] action
create (dev-env::default line 60)
[Tue, 10 Jan 2012 17:11:38 -0200] INFO: Processing
remote_file[/home/mee/install/answerjdk5] action create
(dev-env::default line 67)
[Tue, 10 Jan 2012 17:11:38 -0200] INFO: Processing
execute[install_jdk5] action run (dev-env::default line 74)
[Tue, 10 Jan 2012 17:11:38 -0200] INFO: execute[install_jdk5]
sh(/home/mee/install/jdk-1_5_0_22-linux-amd64.bin <
/home/mee/install/answerjdk5 > /dev/null)
[Tue, 10 Jan 2012 17:11:40 -0200] INFO: execute[install_jdk5] ran successfully
[Tue, 10 Jan 2012 17:11:41 -0200] INFO: Chef Run complete in 6.528239 seconds
[Tue, 10 Jan 2012 17:11:41 -0200] INFO: Running report handlers
[Tue, 10 Jan 2012 17:11:41 -0200] INFO: Report handlers complete


Can somebody help?

Thanks

Kelly



Archive powered by MHonArc 2.6.16.

§