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

ipagroup: Add support for renaming groups #1178

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

rjeffman
Copy link
Member

FreeIPA suports renaming groupobjects with the CLI parameter "rename",
and this parameter was missing in ansible-freeipa ipagroup module.

This patch adds support for a new state 'renamed' and the 'rename'
parameter.

Tests were updated to cope with the changes.

Fixes #1103

Copy link
Collaborator

@varunmylaraiah varunmylaraiah left a comment

Choose a reason for hiding this comment

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

Changes LGTM

README-group.md Outdated

tasks:
# Rename group appops to webops
- ipagroup:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using named tasks in example playbooks could enhance clarity.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch!

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@t-woerner
Copy link
Member

There is no example for rename in the EXAMPLES section.

@@ -448,7 +460,8 @@ def main():
aliases=[
"ipaexternalmember",
"external_member"
])
]),
rename=dict(type="str", required=False, aliases=["new_name"]),
Copy link
Member

@t-woerner t-woerner Dec 19, 2023

Choose a reason for hiding this comment

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

Is default=None needed additionally?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@t-woerner
Copy link
Member

Is it needed to ensure that there will not be a name conflict? Several renames to the same name or a rename to an already existing name?

@t-woerner
Copy link
Member

Is it needed to ensure that there will not be a name conflict? Several renames to the same name or a rename to an already existing name?

New issue for this: #1194

Use module_defaults to improve reading test cases.
FreeIPA suports renaming groupobjects with the CLI parameter "rename",
and this parameter was missing in ansible-freeipa ipagroup module.

This patch adds support for a new state 'renamed' and the 'rename'
parameter.

Tests were updated to cope with the changes.
@rjeffman
Copy link
Member Author

Fixed issues found and added proper tests to rename multiple groups at once.

Copy link
Member

@t-woerner t-woerner left a comment

Choose a reason for hiding this comment

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

LGTM

@t-woerner t-woerner merged commit 4321478 into freeipa:master Dec 21, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipagroup and ipauser plugins do not support rename.
3 participants