{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3585","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3585/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3585/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3585/events","html_url":"https://github.com/ansible/ansible-modules-core/pull/3585","id":152692427,"number":3585,"title":"Do not ignore the primary group if modifying the list of secondaries","user":{"login":"jctanner","id":1869705,"avatar_url":"https://avatars.githubusercontent.com/u/1869705?v=3","gravatar_id":"","url":"https://api.github.com/users/jctanner","html_url":"https://github.com/jctanner","followers_url":"https://api.github.com/users/jctanner/followers","following_url":"https://api.github.com/users/jctanner/following{/other_user}","gists_url":"https://api.github.com/users/jctanner/gists{/gist_id}","starred_url":"https://api.github.com/users/jctanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jctanner/subscriptions","organizations_url":"https://api.github.com/users/jctanner/orgs","repos_url":"https://api.github.com/users/jctanner/repos","events_url":"https://api.github.com/users/jctanner/events{/privacy}","received_events_url":"https://api.github.com/users/jctanner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/shipit","name":"shipit","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-03T03:25:08Z","updated_at":"2016-05-13T15:25:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/3585","html_url":"https://github.com/ansible/ansible-modules-core/pull/3585","diff_url":"https://github.com/ansible/ansible-modules-core/pull/3585.diff","patch_url":"https://github.com/ansible/ansible-modules-core/pull/3585.patch"},"body":"##### ISSUE TYPE\r\n - Bugfix Pull Request\r\n\r\n\r\n##### COMPONENT NAME\r\nmodules/core/system/users.py\r\n\r\n##### ANSIBLE VERSION\r\n```\r\n$ ansible --version\r\nansible 2.1.0 (devel 9d5b4fe212) last updated 2016/05/02 20:58:19 (GMT -400)\r\n  lib/ansible/modules/core: (FIX_1118_usergroups d3790c411a) last updated 2016/05/02 23:21:21 (GMT -400)\r\n  lib/ansible/modules/extras: (devel e8391d6985) last updated 2016/05/02 20:58:34 (GMT -400)\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### SUMMARY\r\n\r\nThe secondary grouplist comparison was always excluding the user's primary group from the list of current groups. By ignoring the primary, and running with append=yes, a \"usermod -a -G\" would always be run and set changed=True for the primary group.  \r\n\r\nFixes #1118"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/219076075","html_url":"https://github.com/ansible/ansible-modules-core/pull/3585#issuecomment-219076075","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3585","id":219076075,"user":{"login":"gregdek","id":252125,"avatar_url":"https://avatars.githubusercontent.com/u/252125?v=3","gravatar_id":"","url":"https://api.github.com/users/gregdek","html_url":"https://github.com/gregdek","followers_url":"https://api.github.com/users/gregdek/followers","following_url":"https://api.github.com/users/gregdek/following{/other_user}","gists_url":"https://api.github.com/users/gregdek/gists{/gist_id}","starred_url":"https://api.github.com/users/gregdek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregdek/subscriptions","organizations_url":"https://api.github.com/users/gregdek/orgs","repos_url":"https://api.github.com/users/gregdek/repos","events_url":"https://api.github.com/users/gregdek/events{/privacy}","received_events_url":"https://api.github.com/users/gregdek/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T15:25:28Z","updated_at":"2016-05-13T15:25:28Z","body":"Thanks again to @jctanner for this PR, and thanks @grossws for reviewing. Marking for inclusion.\n\n[This message brought to you by your friendly Ansibull-bot.]"}}