{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/19172","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/19172/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/19172/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/19172/events","html_url":"https://github.com/ansible/ansible/pull/19172","id":194774511,"number":19172,"title":"introduce `module_utils.urls.fetch_file` as a wrapper to download and save files","user":{"login":"evgeni","id":94284,"avatar_url":"https://avatars3.githubusercontent.com/u/94284?v=4","gravatar_id":"","url":"https://api.github.com/users/evgeni","html_url":"https://github.com/evgeni","followers_url":"https://api.github.com/users/evgeni/followers","following_url":"https://api.github.com/users/evgeni/following{/other_user}","gists_url":"https://api.github.com/users/evgeni/gists{/gist_id}","starred_url":"https://api.github.com/users/evgeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgeni/subscriptions","organizations_url":"https://api.github.com/users/evgeni/orgs","repos_url":"https://api.github.com/users/evgeni/repos","events_url":"https://api.github.com/users/evgeni/events{/privacy}","received_events_url":"https://api.github.com/users/evgeni/received_events","type":"User","site_admin":false},"labels":[{"id":454885231,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":499635167,"url":"https://api.github.com/repos/ansible/ansible/labels/c:module_utils/","name":"c:module_utils/","color":"b60205","default":false},{"id":512406029,"url":"https://api.github.com/repos/ansible/ansible/labels/c:module_utils/urls","name":"c:module_utils/urls","color":"b60205","default":false},{"id":48457821,"url":"https://api.github.com/repos/ansible/ansible/labels/feature_pull_request","name":"feature_pull_request","color":"006b75","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":512427836,"url":"https://api.github.com/repos/ansible/ansible/labels/module_util","name":"module_util","color":"ededed","default":false},{"id":231201931,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_rebase","name":"needs_rebase","color":"eb6420","default":false},{"id":61436281,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_revision","name":"needs_revision","color":"eb6450","default":false},{"id":581543918,"url":"https://api.github.com/repos/ansible/ansible/labels/stale_ci","name":"stale_ci","color":"fef2c0","default":false},{"id":636352796,"url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false},{"id":468273802,"url":"https://api.github.com/repos/ansible/ansible/labels/test","name":"test","color":"0e8a16","default":false},{"id":461464968,"url":"https://api.github.com/repos/ansible/ansible/labels/test_pull_requests","name":"test_pull_requests","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-12-10T15:37:52Z","updated_at":"2017-09-23T16:57:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/19172","html_url":"https://github.com/ansible/ansible/pull/19172","diff_url":"https://github.com/ansible/ansible/pull/19172.diff","patch_url":"https://github.com/ansible/ansible/pull/19172.patch"},"body":"##### ISSUE TYPE\r\n - Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\n* `module_utils.urls`\r\n* `yum`\r\n* `apt`\r\n* `unarchive`\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.3.0 (fetch_file ff9626dcd9) last updated 2016/12/10 16:13:59 (GMT +200)\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### SUMMARY\r\nCurrently a lot of modules use `module_utils.urls.fetch_url` to download a file and process it. This results in quite some duplicated code, which increases the possibility of bugs and makes fixes harder.\r\n\r\nThis PR takes `fetch_rpm_from_url` function from `yum`, moves it to `module_utils.urls.fetch_file` and then re-uses it in the `yum`, `apt` and `unarchive` modules."},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/331650745","html_url":"https://github.com/ansible/ansible/pull/19172#issuecomment-331650745","issue_url":"https://api.github.com/repos/ansible/ansible/issues/19172","id":331650745,"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":"2017-09-23T16:57:11Z","updated_at":"2017-09-23T16:57:11Z","author_association":"CONTRIBUTOR","body":"cc @mkrizek\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: notify --->"}}
{"actor":{"display_login":"ansibot"}}