{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4390","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4390/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4390/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4390/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/4390","id":170700401,"number":4390,"title":"Unarchive fails on MacOS: \"Unexpected error when accessing exploded file: [Errno 2]\"","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-11T17:27:45Z","updated_at":"2016-08-11T17:27:45Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n\r\nUnarchive\r\n\r\n##### ANSIBLE VERSION\r\nTested with three versions (devel is using up-to-date checkout of modules-core)\r\n```\r\nansible 2.2.0 (devel 947877dcce) last updated 2016/08/11 11:34:15 (GMT -400)\r\n  lib/ansible/modules/core: (devel 23ebb98570) last updated 2016/08/11 11:46:27 (GMT -400)\r\n  lib/ansible/modules/extras: (detached HEAD 39153ea154) last updated 2016/08/10 23:59:44 (GMT -400)\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\nAlso:\r\n\r\n```\r\nansible 2.1.1.0\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n*Works correctly with:*\r\n```\r\nansible 2.1.0.0\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\ndefault config\r\n\r\n##### OS / ENVIRONMENT\r\nMac OS X 10.11.6\r\n\r\n##### SUMMARY\r\n\r\nThis seems to be Mac specific. (tested on/against 10.11.6)\r\n\r\nUnarchive fails on Mac OS X when playbook is run locally or when targeting a remote Mac. Included playbook works correctly under Ansible v2.1.0.0. \r\n\r\nErrors are identical running remote or locally.\r\n\r\nThe local playbook works correctly when run on Ubuntu 14.04.4 LTS from the most recent Git checkout. The command also succeeds when targeting an Ubuntu box.\r\n\r\nVarious `copy` and `remote_src` options had no effect. \r\n\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nRun the following playbook on a Mac (all my available test machines are running 10.11.6)\r\n\r\n```\r\n---\r\n\r\n- hosts: localhost\r\n  become: no\r\n  connection: local\r\n\r\n  tasks:\r\n    - name: download archive\r\n      get_url: \r\n        url: https://github.com/ideasonpurpose/basic-wordpress-vagrant/archive/master.zip\r\n        # url: https://wordpress.org/latest.zip\r\n        dest: /tmp/\r\n        force: yes\r\n      register: archive\r\n    \r\n    - name: Unpack downloaded archive\r\n      unarchive: \r\n        src: '{{ archive.dest }}'\r\n        dest: /tmp/\r\n        # copy: no\r\n        remote_src: no\r\n        list_files: yes\r\n\r\n```\r\n\r\n\r\n##### EXPECTED RESULTS\r\n\r\nZip archive is uncompressed\r\n\r\n##### ACTUAL RESULTS\r\n\r\nModule failure. Output is from latest checkout.\r\n\r\n```\r\n [WARNING]: Host file not found: /etc/ansible/hosts\r\n\r\n [WARNING]: provided hosts list is empty, only localhost is available\r\n\r\n\r\nPLAYBOOK: ansible-local-test.yaml **********************************************\r\n1 plays in /Users/joe/Desktop/ansible-local-test.yaml\r\n\r\nPLAY [localhost] ***************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nUsing module file /Users/joe/ansible-dev/lib/ansible/modules/core/system/setup.py\r\n<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: joe\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360 `\" && echo ansible-tmp-1470935578.63-176735032320360=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360 `\" ) && sleep 0'\r\n<127.0.0.1> PUT /var/folders/f2/lskp80tm8xj5230059b53f580000gp/T/tmp3C9ALR TO /Users/joe/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360/setup.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/joe/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360/ /Users/joe/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360/setup.py && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c '/usr/local/opt/python/bin/python2.7 /Users/joe/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360/setup.py; rm -rf \"/Users/joe/.ansible/tmp/ansible-tmp-1470935578.63-176735032320360/\" > /dev/null 2>&1 && sleep 0'\r\nok: [localhost]\r\n\r\nTASK [download archive] ********************************************************\r\ntask path: /Users/joe/Desktop/ansible-local-test.yaml:9\r\nUsing module file /Users/joe/ansible-dev/lib/ansible/modules/core/network/basics/get_url.py\r\n<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: joe\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550 `\" && echo ansible-tmp-1470935579.12-83816721022550=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550 `\" ) && sleep 0'\r\n<127.0.0.1> PUT /var/folders/f2/lskp80tm8xj5230059b53f580000gp/T/tmprUh8qy TO /Users/joe/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550/get_url.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/joe/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550/ /Users/joe/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550/get_url.py && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c '/usr/local/opt/python/bin/python2.7 /Users/joe/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550/get_url.py; rm -rf \"/Users/joe/.ansible/tmp/ansible-tmp-1470935579.12-83816721022550/\" > /dev/null 2>&1 && sleep 0'\r\nchanged: [localhost] => {\r\n    \"changed\": true, \r\n    \"checksum_dest\": null, \r\n    \"checksum_src\": \"c06bd7b6da48f8e1bafb5f09d3058f39ee77b5d8\", \r\n    \"dest\": \"/tmp/basic-wordpress-vagrant-master.zip\", \r\n    \"gid\": 0, \r\n    \"group\": \"wheel\", \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"backup\": false, \r\n            \"checksum\": \"\", \r\n            \"content\": null, \r\n            \"delimiter\": null, \r\n            \"dest\": \"/tmp/\", \r\n            \"directory_mode\": null, \r\n            \"follow\": false, \r\n            \"force\": true, \r\n            \"force_basic_auth\": false, \r\n            \"group\": null, \r\n            \"headers\": null, \r\n            \"http_agent\": \"ansible-httpget\", \r\n            \"mode\": null, \r\n            \"owner\": null, \r\n            \"path\": \"/tmp/basic-wordpress-vagrant-master.zip\", \r\n            \"regexp\": null, \r\n            \"remote_src\": null, \r\n            \"selevel\": null, \r\n            \"serole\": null, \r\n            \"setype\": null, \r\n            \"seuser\": null, \r\n            \"sha256sum\": \"\", \r\n            \"src\": null, \r\n            \"timeout\": 10, \r\n            \"tmp_dest\": \"\", \r\n            \"unsafe_writes\": null, \r\n            \"url\": \"https://github.com/ideasonpurpose/basic-wordpress-vagrant/archive/master.zip\", \r\n            \"url_password\": null, \r\n            \"url_username\": null, \r\n            \"use_proxy\": true, \r\n            \"validate_certs\": true\r\n        }, \r\n        \"module_name\": \"get_url\"\r\n    }, \r\n    \"md5sum\": \"76e57a9d81852954b3cb1ae66c2649c7\", \r\n    \"mode\": \"0644\", \r\n    \"msg\": \"OK (14631 bytes)\", \r\n    \"owner\": \"joe\", \r\n    \"size\": 14631, \r\n    \"src\": \"/var/folders/f2/lskp80tm8xj5230059b53f580000gp/T/tmpNVd4BN\", \r\n    \"state\": \"file\", \r\n    \"uid\": 502, \r\n    \"url\": \"https://github.com/ideasonpurpose/basic-wordpress-vagrant/archive/master.zip\"\r\n}\r\n\r\nTASK [Unpack downloaded archive] ***********************************************\r\ntask path: /Users/joe/Desktop/ansible-local-test.yaml:23\r\n<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: joe\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153 `\" && echo ansible-tmp-1470935580.87-202761726912153=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153 `\" ) && sleep 0'\r\nUsing module file /Users/joe/ansible-dev/lib/ansible/modules/core/files/stat.py\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272 `\" && echo ansible-tmp-1470935580.99-37733200780272=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272 `\" ) && sleep 0'\r\n<127.0.0.1> PUT /var/folders/f2/lskp80tm8xj5230059b53f580000gp/T/tmpnwez_h TO /Users/joe/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272/stat.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/joe/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272/ /Users/joe/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272/stat.py && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c '/usr/local/opt/python/bin/python2.7 /Users/joe/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272/stat.py; rm -rf \"/Users/joe/.ansible/tmp/ansible-tmp-1470935580.99-37733200780272/\" > /dev/null 2>&1 && sleep 0'\r\n<127.0.0.1> PUT /private/tmp/basic-wordpress-vagrant-master.zip TO /Users/joe/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153/source\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/joe/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153/ /Users/joe/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153/source && sleep 0'\r\nUsing module file /Users/joe/ansible-dev/lib/ansible/modules/core/files/unarchive.py\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389 `\" && echo ansible-tmp-1470935581.39-252312604650389=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389 `\" ) && sleep 0'\r\n<127.0.0.1> PUT /var/folders/f2/lskp80tm8xj5230059b53f580000gp/T/tmpGmuhUh TO /Users/joe/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389/unarchive.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/joe/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389/ /Users/joe/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389/unarchive.py && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c '/usr/local/opt/python/bin/python2.7 /Users/joe/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389/unarchive.py; rm -rf \"/Users/joe/.ansible/tmp/ansible-tmp-1470935581.39-252312604650389/\" > /dev/null 2>&1 && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /Users/joe/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153/ > /dev/null 2>&1 && sleep 0'\r\nfatal: [localhost]: FAILED! => {\r\n    \"changed\": false, \r\n    \"dest\": \"/tmp/\", \r\n    \"failed\": true, \r\n    \"gid\": 0, \r\n    \"group\": \"wheel\", \r\n    \"handler\": \"TgzArchive\", \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"backup\": null, \r\n            \"content\": null, \r\n            \"copy\": true, \r\n            \"creates\": null, \r\n            \"delimiter\": null, \r\n            \"dest\": \"/tmp/\", \r\n            \"directory_mode\": null, \r\n            \"exclude\": [], \r\n            \"extra_opts\": [], \r\n            \"follow\": false, \r\n            \"force\": null, \r\n            \"group\": null, \r\n            \"keep_newer\": false, \r\n            \"list_files\": true, \r\n            \"mode\": null, \r\n            \"original_basename\": \"basic-wordpress-vagrant-master.zip\", \r\n            \"owner\": null, \r\n            \"regexp\": null, \r\n            \"remote_src\": false, \r\n            \"selevel\": null, \r\n            \"serole\": null, \r\n            \"setype\": null, \r\n            \"seuser\": null, \r\n            \"src\": \"/Users/joe/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153/source\", \r\n            \"unsafe_writes\": null, \r\n            \"validate_certs\": true\r\n        }\r\n    }, \r\n    \"mode\": \"01777\", \r\n    \"msg\": \"Unexpected error when accessing exploded file: [Errno 2] No such file or directory: '/tmp/basic-wordpress-vagrant-master/'\", \r\n    \"owner\": \"root\", \r\n    \"size\": 1428, \r\n    \"src\": \"/Users/joe/.ansible/tmp/ansible-tmp-1470935580.87-202761726912153/source\", \r\n    \"state\": \"directory\", \r\n    \"uid\": 0\r\n}\r\n\r\nNO MORE HOSTS LEFT *************************************************************\r\n\tto retry, use: --limit @/Users/joe/Desktop/ansible-local-test.retry\r\n\r\nPLAY RECAP *********************************************************************\r\nlocalhost                  : ok=2    changed=1    unreachable=0    failed=1   \r\n```\r\n"}}
{"actor":{"display_login":"joemaller"}}