Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
32f4e083
Unverified
Commit
32f4e083
authored
Jul 8, 2021
by
Rafael Guterres Jeffman
Committed by
GitHub
Jul 8, 2021
Browse files
Options
Downloads
Plain Diff
Merge pull request #584 from t-woerner/fix_automember_action_name
automember: Fix action to be automember or member, not service
parents
5302dda0
fadb62dc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/modules/ipaautomember.py
+11
-9
11 additions, 9 deletions
plugins/modules/ipaautomember.py
with
11 additions
and
9 deletions
plugins/modules/ipaautomember.py
+
11
−
9
View file @
32f4e083
...
@@ -90,9 +90,9 @@ options:
...
@@ -90,9 +90,9 @@ options:
type: str
type: str
required: true
required: true
action:
action:
description: Work on
service
or member level
description: Work on
automember
or member level
default:
service
default:
automember
choices: [
"
member
"
,
"
service
"
]
choices: [
"
member
"
,
"
automember
"
]
state:
state:
description: State to ensure
description: State to ensure
default: present
default: present
...
@@ -211,8 +211,8 @@ def main():
...
@@ -211,8 +211,8 @@ def main():
description
=
dict
(
type
=
"
str
"
,
default
=
None
),
description
=
dict
(
type
=
"
str
"
,
default
=
None
),
automember_type
=
dict
(
type
=
'
str
'
,
required
=
False
,
automember_type
=
dict
(
type
=
'
str
'
,
required
=
False
,
choices
=
[
'
group
'
,
'
hostgroup
'
]),
choices
=
[
'
group
'
,
'
hostgroup
'
]),
action
=
dict
(
type
=
"
str
"
,
default
=
"
service
"
,
action
=
dict
(
type
=
"
str
"
,
default
=
"
automember
"
,
choices
=
[
"
member
"
,
"
service
"
]),
choices
=
[
"
member
"
,
"
automember
"
]),
state
=
dict
(
type
=
"
str
"
,
default
=
"
present
"
,
state
=
dict
(
type
=
"
str
"
,
default
=
"
present
"
,
choices
=
[
"
present
"
,
"
absent
"
,
"
rebuild
"
]),
choices
=
[
"
present
"
,
"
absent
"
,
"
rebuild
"
]),
users
=
dict
(
type
=
"
list
"
,
default
=
None
),
users
=
dict
(
type
=
"
list
"
,
default
=
None
),
...
@@ -278,7 +278,7 @@ def main():
...
@@ -278,7 +278,7 @@ def main():
if
state
==
'
present
'
:
if
state
==
'
present
'
:
args
=
gen_args
(
description
,
automember_type
)
args
=
gen_args
(
description
,
automember_type
)
if
action
==
"
service
"
:
if
action
==
"
automember
"
:
if
res_find
is
not
None
:
if
res_find
is
not
None
:
if
not
compare_args_ipa
(
ansible_module
,
if
not
compare_args_ipa
(
ansible_module
,
args
,
args
,
...
@@ -301,7 +301,8 @@ def main():
...
@@ -301,7 +301,8 @@ def main():
elif
action
==
"
member
"
:
elif
action
==
"
member
"
:
if
res_find
is
None
:
if
res_find
is
None
:
ansible_module
.
fail_json
(
msg
=
"
No service
'
%s
'"
%
name
)
ansible_module
.
fail_json
(
msg
=
"
No automember
'
%s
'"
%
name
)
inclusive_add
=
transform_conditions
(
inclusive
or
[])
inclusive_add
=
transform_conditions
(
inclusive
or
[])
inclusive_del
=
[]
inclusive_del
=
[]
...
@@ -337,14 +338,15 @@ def main():
...
@@ -337,14 +338,15 @@ def main():
condition_args
])
condition_args
])
elif
state
==
'
absent
'
:
elif
state
==
'
absent
'
:
if
action
==
"
service
"
:
if
action
==
"
automember
"
:
if
res_find
is
not
None
:
if
res_find
is
not
None
:
commands
.
append
([
name
,
'
automember_del
'
,
commands
.
append
([
name
,
'
automember_del
'
,
{
'
type
'
:
to_text
(
automember_type
)}])
{
'
type
'
:
to_text
(
automember_type
)}])
elif
action
==
"
member
"
:
elif
action
==
"
member
"
:
if
res_find
is
None
:
if
res_find
is
None
:
ansible_module
.
fail_json
(
msg
=
"
No service
'
%s
'"
%
name
)
ansible_module
.
fail_json
(
msg
=
"
No automember
'
%s
'"
%
name
)
if
inclusive
is
not
None
:
if
inclusive
is
not
None
:
for
_inclusive
in
transform_conditions
(
inclusive
):
for
_inclusive
in
transform_conditions
(
inclusive
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment