Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unzip tar.Z file through CHEF cookbooks

I'm using a Chef hosted server, a workstation and nodes and have run cookbooks on the nodes to install Java, update hosts file. I'm not able to find a reference in sites to unzip tar files. Could you please help me out here or direct to some site which has the information.

Thanks in advance.

like image 284
Azuretechie Avatar asked Feb 10 '15 21:02

Azuretechie


People also ask

Can we unzip tar file?

You can unzip most . tar. gz and other compressed . tar files using the tar utility.

Can 7zip unzip tar?

7-Zip can also be used to unpack many other formats and to create tar files (amongst others).

Can WinRAR extract tar files?

WinRAR handles these compression formats: RAR, ZIP, CAB, ARJ, LZH, ACE, TAR, GZip, UUE, BZ2, JAR, and ISO.


1 Answers

Since Chef Client 15.0 there is a archive_file resource built-in. It supports tar, gzip, bzip, and zip.

archive_file 'Precompiled.zip' do
  path '/tmp/Precompiled.zip'
  destination '/srv/files'
end
like image 58
Draco Ater Avatar answered Sep 21 '22 00:09

Draco Ater