Closed sherlockholmes closed 6 years ago
Same Problem on Solaris 11.3 (x86) on Ansible 2.1.0.0 while 1.9.6 still works
I added a sample playbook and the verbose+debug logs for 2.1 and 1.9 to a gist: https://gist.github.com/passw0rd123/c1475ea4088f43427543119dca7a13f1
@passw0rd123 Can you try again with a more recent Ansible release, preferably the devel branch ?
Also, unarchive only works with GNU tar and unzip because it uses very specific functionality so it is more efficient in how it works. (i.e. it does not extract every time as it used to) We also scrape the output, so support for other tar commands is going to be very fragile.
@sherlockholmes Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.
Here are the items we could not find in your description:
Please set the description of this issue with this template: https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE.md
You can install GNU tar on Solaris 11 with:
- pkg5: name=/archiver/gnu-tar
solaris 11.3 sparc , ansible 2.2.1 installed from OpenCSW, can't reproduce
$ ls
a ansible-out.txt cpu-prom.py local.cshrc local.login local.profile
$ tar -czf /tmp/local.tar.gz local.*
$ ls /tmp
gdm-auth-cookies-Kb33Yc hmptemp hsperfdata_ocm local.tar.gz
$ cd a
~/a$ ansible localhost -i inventory.ini -m unarchive -a 'src=/tmp/local.tar.gz dest=/tmp'
localhost | SUCCESS => {
"changed": true,
"dest": "/tmp",
"extract_results": {
"cmd": [
"/usr/bin/gtar",
"--extract",
"-C",
"/tmp",
"-z",
"-f",
"/export/home/mator/.ansible/tmp/ansible-tmp-1506451090.27-203335961212845/source"
],
"err": "",
"out": "",
"rc": 0
},
"gid": 3,
"group": "sys",
"handler": "TgzArchive",
"mode": "01777",
"owner": "root",
"size": 899,
"src": "/export/home/mator/.ansible/tmp/ansible-tmp-1506451090.27-203335961212845/source",
"state": "directory",
"uid": 0
}
$ ls /tmp
gdm-auth-cookies-Kb33Yc hsperfdata_ocm local.login local.tar.gz
hmptemp local.cshrc local.profile
$ ansible --version
ansible 2.2.1.0
config file = /etc/opt/csw/ansible/ansible.cfg
configured module search path = Default w/o overrides
$ uname -a
SunOS solaris 5.11 11.3 sun4v sparc SUNW,SPARC-Enterprise-T5120
$ pkg search -o path,pkg.name -l /usr/bin/gtar
PATH PKG.NAME
usr/bin/gtar archiver/gnu-tar
$ pkg info archiver/gnu-tar
Name: archiver/gnu-tar
Summary: GNU version of the tar archiving utility
Description: Tar is a program for packaging a set of files as a single
archive in tar format.
Category: Development/GNU
State: Installed
Publisher: solaris
Version: 1.27.1
Build Release: 5.11
Branch: 0.175.3.0.0.30.0
Packaging Date: August 21, 2015 04:13:50 PM
Size: 1.80 MB
FMRI: pkg://solaris/archiver/gnu-tar@1.27.1,5.11-0.175.3.0.0.30.0:20150821T161350Z
@sherlockholmes You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.
Issue Type:
Ansible Version:
Ansible 2.0.2
Ansible Configuration:
As default
Environment:
Solaris 11.2 Sparc
Summary:
Unarchive module cant uncompress tar file.
Steps To Reproduce:
I test the command after crash my playbook, with different kinds files as well:
Expected Results:
I test the same module in ubuntu and uncompress the tar file without problems.
Actual Results:
I think that is a problem of gnutar vs unix tar. Maybe unarchive don't work with the unix tar command.