I want to un zip / un tar a file on AIX system using CHEF. Steps i have done : 1.I have uploaded a zip file Test.zip on AIX system using Winscp. 2.Edited the default.rb using below command: execute "extract_Test_tar" do command "tar -xvf Test.zip" cwd "/var/chef/cookbooks" end 3.While uploading my cookbook it is 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 to exit with [0], but 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" do
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") do
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 to /.chef/local-mode-cache/cache/chef-stacktrace.out [2016-01-29T06:27:47-06:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2016-01-29T06:27:47-06:00] ERROR: execute[extract_Test_tar] (Infy_Patrol::default line 10) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'