Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'member_action' parameter to ipa_hostgroup and ipa_role to add/remove members without specifying complete list of members #56598

Closed
wants to merge 7 commits into from

Conversation

doubleplush
Copy link
Contributor

SUMMARY

Currently, when adding members to a host group or role using the IPA modules, a user must obtain the full list of current members for each host group or role, then append the new members to the list of current members. This change would allow only the new members to be specified, rather than having to specify the complete list of all members. In particular, this simplifies adding multiple members in the same play.

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ipa_hostgroup
ipa_role

@ansibot
Copy link
Contributor

ansibot commented May 17, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 community_review In order to be merged, this PR must follow the community review workflow. feature This issue/PR relates to a feature request. identity Identity category ipa IPA community module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels May 17, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 17, 2019
state:
description: State to ensure
default: "present"
choices: ["present", "absent"]
choices: ["present", "absent", "add_members", "remove_members"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't overload state, but add a new option, perhaps called exclusive (feel free to pick a better name)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What options would you expect to use to remove members from a role? The 'absent' state in conjunction with the new option?

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels May 18, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 28, 2019
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 12, 2019
@ansibot
Copy link
Contributor

ansibot commented Jun 20, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/identity/ipa/ipa_hostgroup.py:0:0: E309 version_added for new option (member_action) should be '2.9'. Currently StrictVersion ('0.0')

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. and removed ci_verified Changes made in this PR are causing tests to fail. labels Jun 20, 2019
@ansibot
Copy link
Contributor

ansibot commented Jun 20, 2019

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/modules/identity/ipa/ipa_hostgroup.py:206:5: E303 too many blank lines (2)
lib/ansible/modules/identity/ipa/ipa_role.py:295:5: E303 too many blank lines (3)

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. and removed ci_verified Changes made in this PR are causing tests to fail. labels Jun 20, 2019
@ansibot
Copy link
Contributor

ansibot commented Jun 20, 2019

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/identity/ipa/ipa_hostgroup.py:207:5: E303 too many blank lines (2)

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Jun 20, 2019
@ansibot ansibot added the community_review In order to be merged, this PR must follow the community review workflow. label Mar 10, 2020
@ansibot
Copy link
Contributor

ansibot commented Mar 10, 2020

The test ansible-test sanity --test validate-modules [explain] failed with 3 errors:

lib/ansible/modules/identity/ipa/ipa_hostgroup.py:0:0: doc-choices-do-not-match-spec: Argument 'state' in argument_spec defines choices as (['present', 'absent', 'enabled', 'disabled']) but documentation defines choices as (['present', 'absent', 'add_members', 'remove_members', 'enabled', 'disabled'])
lib/ansible/modules/identity/ipa/ipa_hostgroup.py:0:0: parameter-type-not-in-doc: Argument 'member_action' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/identity/ipa/ipa_role.py:0:0: parameter-type-not-in-doc: Argument 'member_action' in argument_spec defines type as 'str' but documentation doesn't define type

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Mar 10, 2020
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 10, 2020
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 20, 2020
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Mar 28, 2020
@ansibot ansibot added collection Related to Ansible Collections work collection:community.general needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md labels Apr 29, 2020
@missnebun
Copy link

Any particular reason that this pull request is not merge ?

@ansibot
Copy link
Contributor

ansibot commented Aug 12, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@ansibot ansibot closed this Aug 12, 2020
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Aug 12, 2020
@ansible ansible locked and limited conversation to collaborators Sep 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bot_closed collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. identity Identity category ipa IPA community module This issue/PR relates to a module. needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants