mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 20:34:41 +00:00
ipareplica_setup_adtrust: Fix setup_ca, master_host_name and ldap2 backend connection
The parameter config_setup_ca has been renamed to setup_ca and added to options. master_host_name has been added to config. Also a call for api.Backend.ldap2.connect has been added to make sure that the backend is connected.
This commit is contained in:
@@ -52,7 +52,7 @@ options:
|
|||||||
_top_dir:
|
_top_dir:
|
||||||
description:
|
description:
|
||||||
required: yes
|
required: yes
|
||||||
config_setup_ca:
|
setup_ca:
|
||||||
description:
|
description:
|
||||||
required: yes
|
required: yes
|
||||||
config_master_host_name:
|
config_master_host_name:
|
||||||
@@ -82,7 +82,7 @@ def main():
|
|||||||
### additional ###
|
### additional ###
|
||||||
ccache=dict(required=True),
|
ccache=dict(required=True),
|
||||||
_top_dir = dict(required=True),
|
_top_dir = dict(required=True),
|
||||||
config_setup_ca=dict(required=True),
|
setup_ca=dict(required=True),
|
||||||
config_master_host_name=dict(required=True),
|
config_master_host_name=dict(required=True),
|
||||||
),
|
),
|
||||||
supports_check_mode = True,
|
supports_check_mode = True,
|
||||||
@@ -105,7 +105,7 @@ def main():
|
|||||||
ccache = ansible_module.params.get('ccache')
|
ccache = ansible_module.params.get('ccache')
|
||||||
os.environ['KRB5CCNAME'] = ccache
|
os.environ['KRB5CCNAME'] = ccache
|
||||||
options._top_dir = ansible_module.params.get('_top_dir')
|
options._top_dir = ansible_module.params.get('_top_dir')
|
||||||
config_setup_ca = ansible_module.params.get('config_setup_ca')
|
options.setup_ca = ansible_module.params.get('setup_ca')
|
||||||
config_master_host_name = ansible_module.params.get('config_master_host_name')
|
config_master_host_name = ansible_module.params.get('config_master_host_name')
|
||||||
|
|
||||||
# init #
|
# init #
|
||||||
@@ -115,7 +115,6 @@ def main():
|
|||||||
|
|
||||||
ansible_log.debug("== INSTALL ==")
|
ansible_log.debug("== INSTALL ==")
|
||||||
|
|
||||||
options = installer
|
|
||||||
promote = installer.promote
|
promote = installer.promote
|
||||||
|
|
||||||
env = gen_env_boostrap_finalize_core(paths.ETC_IPA,
|
env = gen_env_boostrap_finalize_core(paths.ETC_IPA,
|
||||||
@@ -123,13 +122,16 @@ def main():
|
|||||||
api_bootstrap_finalize(env)
|
api_bootstrap_finalize(env)
|
||||||
config = gen_ReplicaConfig()
|
config = gen_ReplicaConfig()
|
||||||
config.subject_base = options.subject_base
|
config.subject_base = options.subject_base
|
||||||
|
config.master_host_name = config_master_host_name
|
||||||
|
|
||||||
remote_api = gen_remote_api(master_host_name, paths.ETC_IPA)
|
remote_api = gen_remote_api(config.master_host_name, paths.ETC_IPA)
|
||||||
installer._remote_api = remote_api
|
installer._remote_api = remote_api
|
||||||
|
|
||||||
conn = remote_api.Backend.ldap2
|
conn = remote_api.Backend.ldap2
|
||||||
ccache = os.environ['KRB5CCNAME']
|
ccache = os.environ['KRB5CCNAME']
|
||||||
|
|
||||||
|
api.Backend.ldap2.connect()
|
||||||
|
|
||||||
with redirect_stdout(ansible_log):
|
with redirect_stdout(ansible_log):
|
||||||
#if options.setup_adtrust:
|
#if options.setup_adtrust:
|
||||||
ansible_log.debug("-- INSTALL ADTRUST --")
|
ansible_log.debug("-- INSTALL ADTRUST --")
|
||||||
|
|||||||
@@ -595,7 +595,7 @@
|
|||||||
### additional ###
|
### additional ###
|
||||||
ccache: "{{ result_ipareplica_prepare.ccache }}"
|
ccache: "{{ result_ipareplica_prepare.ccache }}"
|
||||||
_top_dir: "{{ result_ipareplica_prepare._top_dir }}"
|
_top_dir: "{{ result_ipareplica_prepare._top_dir }}"
|
||||||
config_setup_ca: "{{ result_ipareplica_prepare.config_setup_ca }}"
|
setup_ca: "{{ result_ipareplica_prepare.config_setup_ca }}"
|
||||||
config_master_host_name: "{{ result_ipareplica_prepare.config_master_host_name }}"
|
config_master_host_name: "{{ result_ipareplica_prepare.config_master_host_name }}"
|
||||||
when: result_ipareplica_test.setup_adtrust
|
when: result_ipareplica_test.setup_adtrust
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user