{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/17009","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/17009/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17009/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/17009/events","html_url":"https://github.com/ansible/ansible/issues/17009","id":170039309,"number":17009,"title":"unarchive remote source from http URL fails","user":{"login":"keywork","id":4019239,"avatar_url":"https://avatars.githubusercontent.com/u/4019239?v=3","gravatar_id":"","url":"https://api.github.com/users/keywork","html_url":"https://github.com/keywork","followers_url":"https://api.github.com/users/keywork/followers","following_url":"https://api.github.com/users/keywork/following{/other_user}","gists_url":"https://api.github.com/users/keywork/gists{/gist_id}","starred_url":"https://api.github.com/users/keywork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keywork/subscriptions","organizations_url":"https://api.github.com/users/keywork/orgs","repos_url":"https://api.github.com/users/keywork/repos","events_url":"https://api.github.com/users/keywork/events{/privacy}","received_events_url":"https://api.github.com/users/keywork/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-08T22:18:59Z","updated_at":"2016-08-09T21:38:24Z","closed_at":null,"body":"<!--- Verify first that your issue/request is not already reported in GitHub -->\r\n\r\n##### ISSUE TYPE\r\n\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.2.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\n\r\nDefault\r\n\r\n\r\n##### OS / ENVIRONMENT\r\n\r\nRunning Ansible from Arch Linux 4.6.4-1-ARCH\r\nTarget machine is running Centos 7.2.1511   3.10.0-327.22.2.el7.x86_64\r\n\r\n##### SUMMARY\r\nAttempting to run the unarchive task to download and extract an http URL yields an error   FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"Unable to find 'https://wordpress.org/latest.tar.gz' in expected paths.\"}\r\n\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nRun a playbook with the line included below to download and unarchive\r\n\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```\r\n- name: Extract archive\r\n  unarchive: src=https://wordpress.org/latest.tar.gz dest=/home/admin/sites/{{ my_domain }} remote_src=yes\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n It is expected that the file will be properly downloaded  and extracted to the destination directory\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nTASK [ansible-role-wordpress : Extract archive] ********************************\r\ntask path: /deploy/ansible-role-wordpress/tasks/main.yaml:2\r\n<X.X.X.X> ESTABLISH SSH CONNECTION FOR USER: root\r\n<X.X.X.X> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/XXXX/.ansible/cp/ansible-ssh-%h-%p-%r X.X.X.X '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470694434.93-161431668468931 `\" && echo ansible-tmp-1470694434.93-161431668468931=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470694434.93-161431668468931 `\" ) && sleep 0'\"'\"''\r\n<X.X.X.X> ESTABLISH SSH CONNECTION FOR USER: root\r\n<X.X.X.X> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/XXXX/.ansible/cp/ansible-ssh-%h-%p-%r X.X.X.X '/bin/sh -c '\"'\"'rm -f -r /root/.ansible/tmp/ansible-tmp-1470694434.93-161431668468931/ > /dev/null 2>&1 && sleep 0'\"'\"''\r\nfatal: [X.X.X.X: FAILED! => {\r\n    \"changed\": false, \r\n    \"failed\": true, \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"dest\": \"/home/admin/sites/mydomain.com\", \r\n            \"remote_src\": \"yes\", \r\n            \"src\": \"https://wordpress.org/latest.tar.gz\"\r\n        }, \r\n        \"module_name\": \"unarchive\"\r\n    }, \r\n    \"msg\": \"Unable to find 'https://wordpress.org/latest.tar.gz' in expected paths.\"\r\n}\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/238700071","html_url":"https://github.com/ansible/ansible/issues/17009#issuecomment-238700071","issue_url":"https://api.github.com/repos/ansible/ansible/issues/17009","id":238700071,"user":{"login":"joemaller","id":8320,"avatar_url":"https://avatars.githubusercontent.com/u/8320?v=3","gravatar_id":"","url":"https://api.github.com/users/joemaller","html_url":"https://github.com/joemaller","followers_url":"https://api.github.com/users/joemaller/followers","following_url":"https://api.github.com/users/joemaller/following{/other_user}","gists_url":"https://api.github.com/users/joemaller/gists{/gist_id}","starred_url":"https://api.github.com/users/joemaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joemaller/subscriptions","organizations_url":"https://api.github.com/users/joemaller/orgs","repos_url":"https://api.github.com/users/joemaller/repos","events_url":"https://api.github.com/users/joemaller/events{/privacy}","received_events_url":"https://api.github.com/users/joemaller/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T21:38:24Z","updated_at":"2016-08-09T21:38:24Z","body":"There seems to be issues with specific archives. I'm encountering a similar error trying to download the zip copy of the same WordPress archive with Ansible v2.1.1.0:\r\n\r\n    \"Unexpected error when accessing exploded file: [Errno 2] No such file or directory: '/tmp/wordpress/'\",\r\n\r\nThe same file downloaded from the same playbook works correctly under Ansible v2.1.0.0.\r\n\r\nIf I manually expand and recompress the archive, it works correctly under Ansible v2.1.1.0. (I'm testing with copies on a separate server to help isolate the problem.)\r\n\r\nI don't know much about archive internals or what might have changed regarding Ansible's handling of archives between those two releases, but I'm going to do some more research and see what I can find. "}}
{"actor":{"display_login":"joemaller"}}