[PR #8900/a32f1d69 backport][stable-7] ipa_hostgroup: fix state params (#8904)
ipa_hostgroup: fix state params (#8900)
* Fix ipa_hostgroup
* Add CHANGELOG fragment
(cherry picked from commit a32f1d699b
)
Co-authored-by: alexander <79072457+abakanovskii@users.noreply.github.com>
pull/8914/head
parent
4a6ed38ee2
commit
855201d9fb
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- ipa_hostgroup - fix ``enabled `` and ``disabled`` states (https://github.com/ansible-collections/community.general/issues/8408, https://github.com/ansible-collections/community.general/pull/8900).
|
|
@ -57,13 +57,14 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- State to ensure.
|
- State to ensure.
|
||||||
|
- V("absent") and V("disabled") give the same results.
|
||||||
|
- V("present") and V("enabled") give the same results.
|
||||||
default: "present"
|
default: "present"
|
||||||
choices: ["absent", "disabled", "enabled", "present"]
|
choices: ["absent", "disabled", "enabled", "present"]
|
||||||
type: str
|
type: str
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.ipa.documentation
|
- community.general.ipa.documentation
|
||||||
- community.general.attributes
|
- community.general.attributes
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
|
@ -160,7 +161,7 @@ def ensure(module, client):
|
||||||
module_hostgroup = get_hostgroup_dict(description=module.params['description'])
|
module_hostgroup = get_hostgroup_dict(description=module.params['description'])
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
if state == 'present':
|
if state in ['present', 'enabled']:
|
||||||
if not ipa_hostgroup:
|
if not ipa_hostgroup:
|
||||||
changed = True
|
changed = True
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
|
|
Loading…
Reference in New Issue