ipa_group: add append option (#3545)

* ipa: add append parameter to modify_if_diff

* ipa_group: add state: append

* ipa_group: rework append to an option instead of another state

* ipa_group: append default=no

* ipa_group: add change fragment for new append option

* ipa_group: restore descriptions for group and user

* ipa_group: re-add missed quotation mark

* ipa_group: set default for append in
argument_spec

* ipa_group: add .yml ext to fragement file

* ipa_group: corrections to append description

* ipa_group: refine change fragement text

Co-authored-by: Felix Fontein <felix@fontein.de>

* ipa_group: use correct macros in option descriptions

Co-authored-by: Felix Fontein <felix@fontein.de>

* ipa_group: include append in user and group descriptions

* ipa_group: add version_added

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Rossen 2021-10-19 12:36:08 +01:00 committed by GitHub
parent e8c37ca605
commit ef0b83fdf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 9 deletions

View file

@ -179,10 +179,10 @@ class IPAClient(object):
result.append(key)
return result
def modify_if_diff(self, name, ipa_list, module_list, add_method, remove_method, item=None):
def modify_if_diff(self, name, ipa_list, module_list, add_method, remove_method, item=None, append=None):
changed = False
diff = list(set(ipa_list) - set(module_list))
if len(diff) > 0:
if append is not True and len(diff) > 0:
changed = True
if not self.module.check_mode:
if item: