install - Error while unzipping file on AIX system using CHEF -


i want un zip / un tar file on aix system using chef. steps have done : 1.i have uploaded zip file test.zip on aix system using winscp. 2.edited default.rb using below command: execute "extract_test_tar" command "tar -xvf test.zip" cwd "/var/chef/cookbooks" end 3.while uploading cookbook giving me following error:

recipe: infy_patrol::default * execute[extract_test_tar] action run

================================================================================ error executing action `run` on resource 'execute[extract_test_tar]' ================================================================================  mixlib::shellout::shellcommandfailed ------------------------------------ expected process exit [0], received '1' ---- begin output of tar -xvf test.zip ---- stdout: stderr: tar: tape blocksize error ---- end output of tar -xvf test.zip ---- ran tar -xvf test.zip returned 1  resource declaration: --------------------- # in /.chef/local-mode-cache/cache/cookbooks/infy_patrol/recipes/default.rb   10: execute "extract_test_tar"  11:   command "tar -xvf test.zip"  12:   cwd "/var/chef/cookbooks"  13: end  compiled resource: ------------------ # declared in /.chef/local-mode-cache/cache/cookbooks/infy_patrol/recipes/default.rb:10:in `from_file'  execute("extract_test_tar")   action [:run]   retries 0   retry_delay 2   default_guard_interpreter :execute   command "tar -xvf test.zip"   backup 5   cwd "/var/chef/cookbooks"   returns 0   declared_type :execute   cookbook_name "infy_patrol"   recipe_name "default" end 

running handlers: [2016-01-29t06:27:47-06:00] error: running exception handlers running handlers complete [2016-01-29t06:27:47-06:00] error: exception handlers complete chef client failed. 0 resources updated in 05 seconds [2016-01-29t06:27:47-06:00] fatal: stacktrace dumped /.chef/local-mode-cache/cache/chef-stacktrace.out [2016-01-29t06:27:47-06:00] fatal: please provide contents of stacktrace.out file if file bug report [2016-01-29t06:27:47-06:00] error: execute[extract_test_tar] (infy_patrol::default line 10) had error: mixlib::shellout::shellcommandfailed: expected process exit [0], received '1'

rephrasing question.

below steps followed : 1.logged aix machine.2.logged winscp. 3.created cookbook using : knife cookbook create test 4.using winscp went path cookbook saved: /var/chef/cookbooks/test 5.opened recipes folder: , edited default.rb given:

# # cookbook name:: infy_patrol # recipe:: default # # copyright 2016, your_company_name # # rights reserved - not redistribute #  tar_extract '/var/chef/cookbooks/test.zip'   action :extract_local   target_dir '/var/chef/cookbooks'   creates '/var/chef/cookbooks/new' end  #also tried following piece of code #execute "extract files" #command "tar xvf test.tar.gz -c /var/chef/cookbooks" #end  6.uploaded cookbook using :  chef-client -z -r test::default  giving me error : error executing action `run` on resource 'execute[extract_test_tar] 

Comments