New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unarchive: unable to unpack tar.gz from URI with python3 interpreter #23591
Comments
I'm having the same issue ( with python 2.7 though) I think it's coming fromn the fact that |
This appears to be an inconsistency in the way that Specifically due to these lines: # did tar file arrive?
if not os.path.exists(src):
if not remote_src and copy:
module.fail_json(msg="Source '%s' failed to transfer" % src) The change that likely caused this is 6aeea1f The work around currently is to also supply |
git bisect tells me that it hasn't been working since 7b197d8 probably because of this :
in ansible/lib/ansible/plugins/action/unarchive.py Using |
…ake copy action plugin only. Fixes ansible#23591
I've submitted a PR which should resolve the issue: If possible, please test. |
resolved_by_pr #24732 |
I confirm that the issue is resolved. Great! |
@pvdputte not sure what the Ansible policy is, but, the PR is still not merged. I wouldn't consider this ticket closed until it's merged as it might confuse people or lead to the creation of dupes of this ticket |
Need sleep, sorry. |
ISSUE TYPE
COMPONENT NAME
unarchive
ANSIBLE VERSION
CONFIGURATION
Default
OS / ENVIRONMENT
Running from ubuntu 14.04LTS
Managing ubuntu 17.04 (only python 3 after base install)
SUMMARY
Attempting to run the unarchive task to download and extract an http URL yields an error "Source 'http://cdn01.downloads.smartbear.com/soapui/5.3.0/SoapUI-5.3.0-linux-bin.tar.gz' failed to transfer"
STEPS TO REPRODUCE
$ ansible-d targethost -e 'ansible_python_interpreter=/usr/bin/python3' -m unarchive -a "src=http://cdn01.downloads.smartbear.com/soapui/5.3.0/SoapUI-5.3.0-linux-bin.tar.gz dest=/tmp remote_src=true"
EXPECTED RESULTS
tar.gz file is fetched and extracted in the expected location. E.g. with python 2:
ACTUAL RESULTS
ansible 2.3:
ansible 2.4:
Using ansible + python 2 to download on the target system works fine.
At first I thought it would be similar to #19710, but apparently something related has already changed in master, as the 2.4 output looks different.
The text was updated successfully, but these errors were encountered: