-
Notifications
You must be signed in to change notification settings - Fork 231
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
Conversation
ccb4b34
to
ab1ffee
Compare
There was a problem hiding this 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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
ab1ffee
to
fc8c5bc
Compare
There is no example for rename in the |
plugins/modules/ipagroup.py
Outdated
@@ -448,7 +460,8 @@ def main(): | |||
aliases=[ | |||
"ipaexternalmember", | |||
"external_member" | |||
]) | |||
]), | |||
rename=dict(type="str", required=False, aliases=["new_name"]), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
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.
fc8c5bc
to
1ecdbd3
Compare
Fixed issues found and added proper tests to rename multiple groups at once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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