{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2108","repository_url":"https://api.github.com/repos/ansible/ansible-modules-extras","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2108/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2108/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2108/events","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2108","id":151072690,"number":2108,"title":"refactor zypper module","user":{"login":"robinro","id":107032,"avatar_url":"https://avatars.githubusercontent.com/u/107032?v=3","gravatar_id":"","url":"https://api.github.com/users/robinro","html_url":"https://github.com/robinro","followers_url":"https://api.github.com/users/robinro/followers","following_url":"https://api.github.com/users/robinro/following{/other_user}","gists_url":"https://api.github.com/users/robinro/gists{/gist_id}","starred_url":"https://api.github.com/users/robinro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinro/subscriptions","organizations_url":"https://api.github.com/users/robinro/orgs","repos_url":"https://api.github.com/users/robinro/repos","events_url":"https://api.github.com/users/robinro/events{/privacy}","received_events_url":"https://api.github.com/users/robinro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270"},{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/shipit","name":"shipit","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-04-26T08:23:11Z","updated_at":"2016-05-04T07:00:03Z","closed_at":"2016-05-04T05:47:48Z","pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/2108","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2108","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/2108.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/2108.patch"},"body":"##### ISSUE TYPE\r\n - Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\npackaging/os/zypper.py\r\n\r\n##### ANSIBLE VERSION\r\ndevel, 2.1.0\r\n\r\n##### SUMMARY\r\nThis is a major cleanup/refactor of the zypper module.\r\nThanks to @alxgu, @agx, @jasonmader, @andytom, whose commits/PRs are included here.\r\n\r\nCleanup:\r\n* remove mention of old_zypper (no longer supported)\r\n  * requirement goes up to zypper 1.0, SLES 11.0, openSUSE 11.1\r\n  * allows to use newer features (xml output)\r\n  * already done for zypper_repository\r\n* use zypper instead of rpm to get old version information, based on work by @jasonmader\r\n* don't use rpm, zypper can do everything itself\r\n* run zypper only twice, first to determine current state, then to apply changes\r\n\r\nNew features:\r\n* determine change by parsing zypper xmlout\r\n* determine failure by checking return code\r\n* allow simulataneous installation/removal of packages (using '-' and '+' prefix)\r\n  * allows to swap out alternatives without removing packages depending\r\n    on them\r\n* implement checkmode, using zypper --dry-run\r\n* implement diffmode\r\n* implement 'name=* state=latest' and 'name=* state=latest type=patch'\r\n* add force parameter, handed to zypper to allow downgrade or change of vendor/architecture\r\n\r\nFixes/Replaces:\r\n* fixes #1627, give changed=False on installed patches\r\n* fixes #2094, handling URLs for packages\r\n* fixes #1461, fixes #546, allow state=latest name='*'\r\n* fixes #299, changed=False on second install, actually this was fixed earlier, but it is explicitly tested now\r\n* fixes #1824, add type=application\r\n* fixes #1256, install rpm from path, this is done by passing URLs and paths directly to zypper\r\n* fixes #1262, made unnecessary by using zypper instead of rpm to get the current state"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments/216761431","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2108#issuecomment-216761431","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2108","id":216761431,"user":{"login":"robinro","id":107032,"avatar_url":"https://avatars.githubusercontent.com/u/107032?v=3","gravatar_id":"","url":"https://api.github.com/users/robinro","html_url":"https://github.com/robinro","followers_url":"https://api.github.com/users/robinro/followers","following_url":"https://api.github.com/users/robinro/following{/other_user}","gists_url":"https://api.github.com/users/robinro/gists{/gist_id}","starred_url":"https://api.github.com/users/robinro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinro/subscriptions","organizations_url":"https://api.github.com/users/robinro/orgs","repos_url":"https://api.github.com/users/robinro/repos","events_url":"https://api.github.com/users/robinro/events{/privacy}","received_events_url":"https://api.github.com/users/robinro/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T07:00:02Z","updated_at":"2016-05-04T07:00:02Z","body":"thanks @resmo for the merge"}}