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
6b0cf1e7
Unverified
Commit
6b0cf1e7
authored
5 years ago
by
Sergio Oliveira Campos
Browse files
Options
Downloads
Patches
Plain Diff
Doc string improvements
parent
0677af07
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/module_utils/ansible_freeipa_module.py
+10
-3
10 additions, 3 deletions
plugins/module_utils/ansible_freeipa_module.py
roles/ipaclient/library/ipaclient_get_otp.py
+3
-3
3 additions, 3 deletions
roles/ipaclient/library/ipaclient_get_otp.py
with
13 additions
and
6 deletions
plugins/module_utils/ansible_freeipa_module.py
+
10
−
3
View file @
6b0cf1e7
...
...
@@ -63,7 +63,7 @@ if six.PY3:
def
valid_creds
(
module
,
principal
):
# noqa
"""
Get valid cred
i
ntials matching the princial, try GSSAPI first.
"""
"""
Get valid cred
e
ntials matching the princial, try GSSAPI first.
"""
if
"
KRB5CCNAME
"
in
os
.
environ
:
ccache
=
os
.
environ
[
"
KRB5CCNAME
"
]
module
.
debug
(
'
KRB5CCNAME set to %s
'
%
ccache
)
...
...
@@ -127,7 +127,14 @@ def temp_kdestroy(ccache_dir, ccache_name):
def
api_connect
(
context
=
None
):
"""
Create environment, initialize api and connect to ldap2.
"""
"""
Initialize IPA API with the provided context.
`context` can be any of:
* `server` (default)
* `ansible-freeipa`
* `cli_installer`
"""
env
=
Env
()
env
.
_bootstrap
()
env
.
_finalize_core
(
**
dict
(
DEFAULT_CONFIG
))
...
...
@@ -159,7 +166,7 @@ def api_command_no_name(module, command, args):
def
api_check_param
(
command
,
name
):
"""
Return
if param exists in command param list.
"""
"""
Check
if param exists in command param list.
"""
return
name
in
api
.
Command
[
command
].
params
...
...
This diff is collapsed.
Click to expand it.
roles/ipaclient/library/ipaclient_get_otp.py
+
3
−
3
View file @
6b0cf1e7
...
...
@@ -135,7 +135,7 @@ if six.PY3:
def
get_host_diff
(
ipa_host
,
module_host
):
"""
Compare two host dicts and b
uild
s
a dict
of
differences.
B
uild a dict
with the
differences
from two host dicts
.
:param ipa_host: the host structure seen from IPA
:param module_host: the target host structure seen from the module params
...
...
@@ -188,7 +188,7 @@ def get_module_host(module):
def
ensure_host_present
(
module
,
api
,
ipahost
):
"""
Ensure
that the
host exists in IPA and has the same attributes.
Ensure host exists in IPA and has the same attributes.
:param module: the ansible module
:param api: IPA api handle
...
...
@@ -245,7 +245,7 @@ def ensure_host_present(module, api, ipahost):
def
ensure_host_absent
(
module
,
api
,
host
):
"""
Ensure
that the
host does not exist in IPA.
Ensure host does not exist in IPA.
:param module: the ansible module
:param api: the IPA API handle
...
...
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