{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/44968","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/44968/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/44968/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/44968/events","html_url":"https://github.com/ansible/ansible/issues/44968","id":355998103,"node_id":"MDU6SXNzdWUzNTU5OTgxMDM=","number":44968,"title":"archive module can not compress a single file in a tar file","user":{"login":"cesarfn4","id":33290633,"node_id":"MDQ6VXNlcjMzMjkwNjMz","avatar_url":"https://avatars3.githubusercontent.com/u/33290633?v=4","gravatar_id":"","url":"https://api.github.com/users/cesarfn4","html_url":"https://github.com/cesarfn4","followers_url":"https://api.github.com/users/cesarfn4/followers","following_url":"https://api.github.com/users/cesarfn4/following{/other_user}","gists_url":"https://api.github.com/users/cesarfn4/gists{/gist_id}","starred_url":"https://api.github.com/users/cesarfn4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesarfn4/subscriptions","organizations_url":"https://api.github.com/users/cesarfn4/orgs","repos_url":"https://api.github.com/users/cesarfn4/repos","events_url":"https://api.github.com/users/cesarfn4/events{/privacy}","received_events_url":"https://api.github.com/users/cesarfn4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-31T14:14:46Z","updated_at":"2018-08-31T14:36:40Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\nThe archive module can not compress a single file in a tar file getting the following error:\r\n```\r\nThe full traceback is:\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_lzBroV/ansible_module_archive.py\", line 440, in main\r\n    raise OSError(\"Invalid format\")\r\nOSError: Invalid format\r\n```\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\narchive\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.6.3\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /bin/ansible\r\n  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]\r\n\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### STEPS TO REPRODUCE\r\nPlaybook:\r\n```\r\n- name: Compressing file\r\n  hosts: all\r\n  \r\n  tasks:\r\n    - name: Archive module\r\n      archive:\r\n        path: \"/tmp/test_file.txt\"\r\n        dest: \"/tmp/test.tar\"\r\n        format: tar\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nThe \"archive\" module should compress files in tar files.\r\n\r\n##### ACTUAL RESULTS\r\nError:\r\n```\r\nThe full traceback is:\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_lzBroV/ansible_module_archive.py\", line 440, in main\r\n    raise OSError(\"Invalid format\")\r\nOSError: Invalid format\r\n\r\nfatal: [XX.XX.X.XX]: FAILED! => {\r\n    \"changed\": false, \r\n    \"dest\": \"/tmp/test.tar\", \r\n    \"gid\": 0, \r\n    \"group\": \"root\", \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"attributes\": null, \r\n            \"backup\": null, \r\n            \"content\": null, \r\n            \"delimiter\": null, \r\n            \"dest\": \"/tmp/test.tar\", \r\n            \"directory_mode\": null, \r\n            \"exclude_path\": null, \r\n            \"follow\": false, \r\n            \"force\": null, \r\n            \"format\": \"tar\", \r\n            \"group\": null, \r\n            \"mode\": null, \r\n            \"owner\": null, \r\n            \"path\": [\r\n                \"/tmp/test_file.txt\"\r\n            ], \r\n            \"regexp\": null, \r\n            \"remote_src\": null, \r\n            \"remove\": false, \r\n            \"selevel\": null, \r\n            \"serole\": null, \r\n            \"setype\": null, \r\n            \"seuser\": null, \r\n            \"src\": null, \r\n            \"unsafe_writes\": null\r\n        }\r\n    }, \r\n    \"mode\": \"0644\", \r\n    \"msg\": \"Unable to write to compressed file: Invalid format\", \r\n    \"owner\": \"root\", \r\n    \"path\": \"/tmp/fichero_prueba.txt\", \r\n    \"secontext\": \"unconfined_u:object_r:user_tmp_t:s0\", \r\n    \"size\": 0, \r\n    \"state\": \"file\", \r\n    \"uid\": 900\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/417683941","html_url":"https://github.com/ansible/ansible/issues/44968#issuecomment-417683941","issue_url":"https://api.github.com/repos/ansible/ansible/issues/44968","id":417683941,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzY4Mzk0MQ==","user":{"login":"ansibot","id":6585283,"node_id":"MDQ6VXNlcjY1ODUyODM=","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-08-31T14:36:40Z","updated_at":"2018-08-31T14:36:40Z","author_association":"CONTRIBUTOR","body":"Files identified in the description:\n* [lib/ansible/modules/files/archive.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/files/archive.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"}}