{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2527","repository_url":"https://api.github.com/repos/ansible/ansible-modules-extras","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2527/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2527/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2527/events","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2527","id":164054217,"number":2527,"title":"Fix svr4pkg being non-idempotent","user":{"login":"Akint","id":2721104,"avatar_url":"https://avatars.githubusercontent.com/u/2721104?v=3","gravatar_id":"","url":"https://api.github.com/users/Akint","html_url":"https://github.com/Akint","followers_url":"https://api.github.com/users/Akint/followers","following_url":"https://api.github.com/users/Akint/following{/other_user}","gists_url":"https://api.github.com/users/Akint/gists{/gist_id}","starred_url":"https://api.github.com/users/Akint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akint/subscriptions","organizations_url":"https://api.github.com/users/Akint/orgs","repos_url":"https://api.github.com/users/Akint/repos","events_url":"https://api.github.com/users/Akint/events{/privacy}","received_events_url":"https://api.github.com/users/Akint/received_events","type":"User","site_admin":false},"labels":[{"id":132898045,"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270","default":false},{"id":229425764,"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/community_review","name":"community_review","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-06T11:23:29Z","updated_at":"2016-12-06T22:04:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/2527","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2527","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/2527.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/2527.patch"},"body":"##### ISSUE TYPE\n\n<!--- Pick one below and delete the rest: -->\n- Bugfix Pull Request\n##### COMPONENT NAME\n\n<!--- Name of the plugin/module/task -->\n\nsvr4pkg\n##### ANSIBLE VERSION\n\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\n\n```\n$ ./bin/ansible --version\nansible 2.2.0 (devel 7d53fd2ef2) last updated 2016/07/06 17:06:23 (GMT +700)\n  lib/ansible/modules/core: (detached HEAD 4a0a9cd1fc) last updated 2016/07/06 17:06:52 (GMT +700)\n  lib/ansible/modules/extras: (detached HEAD e0b3e2f790) last updated 2016/07/06 17:07:11 (GMT +700)\n  config file = /etc/ansible/ansible.cfg\n  configured module search path = Default w/o overrides\n```\n##### SUMMARY\n\n<!--- Describe the change, including rationale and design decisions -->\n\nRight now module 'svr4pkg' is not idempotent: it fails if state=present is requested and the package is already installed. I decided to return SUCCESS and '\"changed\": false' instead.\n\n<!---\nIf you are fixing an existing issue, please include \"Fixes #nnnn\" in your commit\nmessage and your description; but you should still explain what the change does.\n-->\n\n<!--- Paste verbatim command output below, e.g. before and after your change -->\n\nBefore:\n\n```\n$ ./bin/ansible -i ~/git/ansible-playbooks/test_inventory -u root testz -m svr4pkg -a \"name=CSWcommon state=present src=/var/tmp/common.pkg\"\ntestz | SUCCESS => {\n    \"changed\": true,\n    \"failed\": false,\n    \"name\": \"CSWcommon\",\n    \"state\": \"present\",\n    \"stderr\": \"\\nInstallation of <CSWcommon> was successful.\\n\"\n}\n$ ./bin/ansible -i ~/git/ansible-playbooks/test_inventory -u root testz -m svr4pkg -a \"name=CSWcommon state=present src=/var/tmp/common.pkg\"\ntestz | FAILED! => {\n    \"changed\": false,\n    \"failed\": true,\n    \"name\": \"CSWcommon\",\n    \"state\": \"present\"\n}\n```\n\nAfter:\n\n```\n$ ./bin/ansible -i ~/git/ansible-playbooks/test_inventory -u root testz -m svr4pkg -a \"name=CSWcommon state=present src=/var/tmp/common.pkg\"\ntestz | SUCCESS => {\n    \"changed\": true,\n    \"failed\": false,\n    \"name\": \"CSWcommon\",\n    \"state\": \"present\",\n    \"stderr\": \"\\nInstallation of <CSWcommon> was successful.\\n\"\n}\n$ ./bin/ansible -i ~/git/ansible-playbooks/test_inventory -u root testz -m svr4pkg -a \"name=CSWcommon state=present src=/var/tmp/common.pkg\"\ntestz | SUCCESS => {\n    \"changed\": false\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments/265287522","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2527#issuecomment-265287522","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2527","id":265287522,"user":{"login":"ansibot","id":6585283,"avatar_url":"https://avatars.githubusercontent.com/u/6585283?v=3","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":"2016-12-06T22:04:33Z","updated_at":"2016-12-06T22:04:33Z","body":"This repository has been locked. All new issues and pullrequests should be filed in https://github.com/ansible/ansible\n\nPlease read through the <a href=\"http://docs.ansible.com/ansible/dev_guide/repomerge.html#move-issues-and-prs-to-new-repo\">repomerge</a> page in the dev guide. The guide contains links to tools which automatically move your issue or pullrequest to the ansible/ansible repo.\n\n<!-- boilerplate: repomerge -->"}}
{"actor":{"display_login":"ansibot"}}