{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/36924","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/36924/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/36924/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/36924/events","html_url":"https://github.com/ansible/ansible/issues/36924","id":301551202,"number":36924,"title":"[2.4] git module documentation does not mention that archive can only be used on a local cloned repo","user":{"login":"danowar2k","id":10991509,"avatar_url":"https://avatars2.githubusercontent.com/u/10991509?v=4","gravatar_id":"","url":"https://api.github.com/users/danowar2k","html_url":"https://github.com/danowar2k","followers_url":"https://api.github.com/users/danowar2k/followers","following_url":"https://api.github.com/users/danowar2k/following{/other_user}","gists_url":"https://api.github.com/users/danowar2k/gists{/gist_id}","starred_url":"https://api.github.com/users/danowar2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danowar2k/subscriptions","organizations_url":"https://api.github.com/users/danowar2k/orgs","repos_url":"https://api.github.com/users/danowar2k/repos","events_url":"https://api.github.com/users/danowar2k/events{/privacy}","received_events_url":"https://api.github.com/users/danowar2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-01T20:38:23Z","updated_at":"2018-03-01T20:47:56Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Documentation Report\r\n\r\n##### COMPONENT NAME\r\ngit\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.4.3.0\r\n  config file = /home/vagrant/playbooks/playbook-moodle/ansible.cfg\r\n  configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]\r\n```\r\n\r\n##### CONFIGURATION\r\nANSIBLE_PIPELINING(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = True\r\nCOLOR_VERBOSE(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = bright blue\r\nDEFAULT_BECOME_METHOD(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = sudo\r\nDEFAULT_HOST_LIST(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = [u'/home/vagrant/playbooks/playbook-moodle/inventory/debug_ho\r\nDEFAULT_STDOUT_CALLBACK(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = debug\r\nDEFAULT_TIMEOUT(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = 30\r\nDIFF_ALWAYS(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = True\r\nPERSISTENT_CONNECT_TIMEOUT(/home/vagrant/playbooks/playbook-moodle/ansible.cfg) = 60\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### SUMMARY\r\nThe documentation for the ansible 2.4 module git doesn't say anywhere that to use the **archive** option the repository has to be cloned (**clone** needs to be true).\r\nI'm trying to avoid to clone a repository because I only need an archive of a certain commit, I can't use the archive option this way at the moment. \r\n\r\nThe feature request for the `git-archive` option `--remote` will be in a separate ticket.\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n- name: Locally download the archive of the chosen git repository version\r\n  local_action:\r\n    module: git\r\n    repo: \"git@github.com:moodle/moodle.git\"\r\n    clone: no\r\n    archive: \"~/downloads/official-v3.2.7.tar.gz\"\r\n    version: \"v3.2.7\"\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nAn archive of the `v3.4.1` tag of the Moodle repository should be downloaded to `~/downloads/Moodle-3.4.1.tar.gz`.\r\n\r\n##### ACTUAL RESULTS\r\nNothing was downloaded, it reported changed, but not file was there.\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\ntask path: /home/vagrant/playbooks/playbook-moodle/playbooks/roles/role-moodle_dev_install/tasks/main.yml:37\r\nUsing module file /usr/lib/python2.7/dist-packages/ansible/modules/source_control/git.py\r\n<localhost> ESTABLISH LOCAL CONNECTION FOR USER: vagrant\r\n<localhost> EXEC /bin/sh -c '/usr/bin/python && sleep 0'\r\n>> Newly checked out 36c7af0e7e1e62918da262668114a8b759f39768\r\nchanged: [pb_test -> localhost] => {\r\n    \"after\": \"36c7af0e7e1e62918da262668114a8b759f39768\",\r\n    \"before\": null,\r\n    \"changed\": true,\r\n    \"diff\": {\r\n        \"prepared\": \">> Newly checked out 36c7af0e7e1e62918da262668114a8b759f39768\"\r\n    },\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"accept_hostkey\": false,\r\n            \"archive\": \"/home/vagrant/downloads/official-v3.2.7.tar.gz\",\r\n            \"bare\": false,\r\n            \"clone\": false,\r\n            \"depth\": null,\r\n            \"dest\": null,\r\n            \"executable\": null,\r\n            \"force\": false,\r\n            \"key_file\": null,\r\n            \"recursive\": true,\r\n            \"reference\": null,\r\n            \"refspec\": null,\r\n            \"remote\": \"origin\",\r\n            \"repo\": \"git@github.com:moodle/moodle.git\",\r\n            \"ssh_opts\": null,\r\n            \"track_submodules\": false,\r\n            \"umask\": null,\r\n            \"update\": true,\r\n            \"verify_commit\": false,\r\n            \"version\": \"v3.2.7\"\r\n        }\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/369725695","html_url":"https://github.com/ansible/ansible/issues/36924#issuecomment-369725695","issue_url":"https://api.github.com/repos/ansible/ansible/issues/36924","id":369725695,"user":{"login":"ansibot","id":6585283,"avatar_url":"https://avatars0.githubusercontent.com/u/6585283?v=4","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T20:47:56Z","updated_at":"2018-03-01T20:47:56Z","author_association":"CONTRIBUTOR","body":"Files identified in the description:\n* [lib/ansible/modules/source_control/git.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/source_control/git.py)\n\nIf these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.\n\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: components_banner --->"}}
{"actor":{"display_login":"ansibot"}}