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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
0fb05dfa
Unverified
Commit
0fb05dfa
authored
5 years ago
by
Rafael Guterres Jeffman
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #240 from seocam/dnszone-update
Fixed a bug in AnsibleFreeIPAParams
parents
d7af454d
22059072
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/module_utils/ansible_freeipa_module.py
+19
-5
19 additions, 5 deletions
plugins/module_utils/ansible_freeipa_module.py
with
19 additions
and
5 deletions
plugins/module_utils/ansible_freeipa_module.py
+
19
−
5
View file @
0fb05dfa
...
...
@@ -52,6 +52,11 @@ import socket
import
base64
import
six
try
:
from
collections.abc
import
Mapping
# noqa
except
ImportError
:
from
collections
import
Mapping
# noqa
if
six
.
PY3
:
unicode
=
str
...
...
@@ -351,19 +356,28 @@ def is_ipv6_addr(ipaddr):
return
True
class
AnsibleFreeIPAParams
(
dict
):
class
AnsibleFreeIPAParams
(
Mapping
):
def
__init__
(
self
,
ansible_module
):
self
.
update
(
ansible_module
.
params
)
self
.
mapping
=
ansible_module
.
params
self
.
ansible_module
=
ansible_module
def
__getitem__
(
self
,
key
):
param
=
self
.
mapping
[
key
]
if
param
is
not
None
:
return
_afm_convert
(
param
)
def
__iter__
(
self
):
return
iter
(
self
.
mapping
)
def
__len__
(
self
):
return
len
(
self
.
mapping
)
@property
def
names
(
self
):
return
self
.
name
def
__getattr__
(
self
,
name
):
param
=
self
.
get
(
name
)
if
param
is
not
None
:
return
_afm_convert
(
param
)
return
self
.
get
(
name
)
class
FreeIPABaseModule
(
AnsibleModule
):
...
...
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
register
or
sign in
to comment