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
8da4b73b
Unverified
Commit
8da4b73b
authored
Nov 29, 2019
by
Thomas Woerner
Committed by
GitHub
Nov 29, 2019
Browse files
Options
Downloads
Plain Diff
Merge pull request #153 from rjeffman/api_context_change
Added context configuration to api_connect.
parents
16cbb871
60861411
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/module_utils/ansible_freeipa_module.py
+14
-3
14 additions, 3 deletions
plugins/module_utils/ansible_freeipa_module.py
with
14 additions
and
3 deletions
plugins/module_utils/ansible_freeipa_module.py
+
14
−
3
View file @
8da4b73b
...
@@ -113,7 +113,7 @@ def temp_kdestroy(ccache_dir, ccache_name):
...
@@ -113,7 +113,7 @@ def temp_kdestroy(ccache_dir, ccache_name):
shutil
.
rmtree
(
ccache_dir
,
ignore_errors
=
True
)
shutil
.
rmtree
(
ccache_dir
,
ignore_errors
=
True
)
def
api_connect
():
def
api_connect
(
context
=
None
):
"""
"""
Create environment, initialize api and connect to ldap2
Create environment, initialize api and connect to ldap2
"""
"""
...
@@ -121,9 +121,20 @@ def api_connect():
...
@@ -121,9 +121,20 @@ def api_connect():
env
.
_bootstrap
()
env
.
_bootstrap
()
env
.
_finalize_core
(
**
dict
(
DEFAULT_CONFIG
))
env
.
_finalize_core
(
**
dict
(
DEFAULT_CONFIG
))
api
.
bootstrap
(
context
=
'
server
'
,
debug
=
env
.
debug
,
log
=
None
)
# available contexts are 'server', 'ansible-freeipa' and 'cli_installer'
if
context
is
None
:
context
=
'
server
'
api
.
bootstrap
(
context
=
context
,
debug
=
env
.
debug
,
log
=
None
)
api
.
finalize
()
api
.
finalize
()
api
.
Backend
.
ldap2
.
connect
()
if
api
.
env
.
in_server
:
backend
=
api
.
Backend
.
ldap2
else
:
backend
=
api
.
Backend
.
rpcclient
if
not
backend
.
isconnected
():
backend
.
connect
()
def
api_command
(
module
,
command
,
name
,
args
):
def
api_command
(
module
,
command
,
name
,
args
):
...
...
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