Skip to content
Snippets Groups Projects
Commit 9fb32b23 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ipareplica_setup_ds: Use inspect on install_replica_ds and install_dns_records

The promote argument has been dropped with the final removal of domain
level 0 support in version 4.7.1. The fstore argument has been added
with the 4.7.1 version also.
parent b8dd597a
No related branches found
No related tags found
No related merge requests found
...@@ -313,15 +313,35 @@ def main(): ...@@ -313,15 +313,35 @@ def main():
ansible_log.debug("-- CONFIGURE DIRSRV --") ansible_log.debug("-- CONFIGURE DIRSRV --")
# Configure dirsrv # Configure dirsrv
with redirect_stdout(ansible_log): with redirect_stdout(ansible_log):
argspec = inspect.getargspec(install_replica_ds)
if "promote" in argspec.args:
ds = install_replica_ds(config, options, ca_enabled, ds = install_replica_ds(config, options, ca_enabled,
remote_api, remote_api,
ca_file=cafile, ca_file=cafile,
promote=promote, promote=promote,
pkcs12_info=dirsrv_pkcs12_info) pkcs12_info=dirsrv_pkcs12_info)
else:
if "fstore" in argspec.args:
ds = install_replica_ds(config, options, ca_enabled,
remote_api,
ca_file=cafile,
pkcs12_info=dirsrv_pkcs12_info,
fstore=fstore)
else:
ds = install_replica_ds(config, options, ca_enabled,
remote_api,
ca_file=cafile,
pkcs12_info=dirsrv_pkcs12_info)
ansible_log.debug("-- INSTALL DNS RECORDS --") ansible_log.debug("-- INSTALL DNS RECORDS --")
# Always try to install DNS records # Always try to install DNS records
argspec = inspect.getargspec(install_dns_records)
if "fstore" not in argspec.args:
install_dns_records(config, options, remote_api) install_dns_records(config, options, remote_api)
else:
install_dns_records(config, options, remote_api, fstore=fstore)
# TODO: check if ntp needs to be enabled later on
ansible_log.debug("-- NTP LDAP ENABLE --") ansible_log.debug("-- NTP LDAP ENABLE --")
if ntpinstance is not None: if ntpinstance is not None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment