ipa[server,replica,client]: pylint fixes

This commit is contained in:
Thomas Woerner
2019-07-17 18:54:20 +02:00
parent 3a4cb6a732
commit de9d8b50cf
14 changed files with 28 additions and 24 deletions

View File

@@ -88,7 +88,7 @@ def main():
fstore = sysrestore.FileStore(paths.SYSRESTORE)
if NUM_VERSION < 40600:
if hasattr(tasks, "configure_tmpfiles"):
# Make sure the files we crated in /var/run are recreated at startup
tasks.configure_tmpfiles()

View File

@@ -71,7 +71,7 @@ def main():
if options.dm_password is None:
ansible_module.fail_json(msg="Directory Manager password required")
try:
cache_vars = read_cache(dm_password)
cache_vars = read_cache(options.dm_password)
options.__dict__.update(cache_vars)
if cache_vars.get('external_ca', False):
options.external_ca = False
@@ -83,7 +83,7 @@ def main():
kwargs = { "changed": True }
for name in options.__dict__:
kwargs[name] = options.__dict__[name]
ansible_module.exit_json(kwargs)
ansible_module.exit_json(**kwargs)
# done ##################################################################

View File

@@ -127,7 +127,7 @@ def main():
# Make sure tmpfiles dir exist before installing components
if NUM_VERSION == 40504:
tasks.create_tmpfiles_dirs(IPAAPI_USER)
elif NUM_VERSION >= 40500 and NUM_VERSION <= 40503:
elif 40500 <= NUM_VERSION <= 40503:
tasks.create_tmpfiles_dirs()
# Create a directory server instance
@@ -138,7 +138,7 @@ def main():
ds.set_output(ansible_log)
if options.dirsrv_cert_files:
_dirsrv_pkcs12_info=options.dirsrv_pkcs12_info
_dirsrv_pkcs12_info=options._dirsrv_pkcs12_info
else:
_dirsrv_pkcs12_info=None

View File

@@ -158,12 +158,12 @@ def main():
options.dirsrv_cert_files = ansible_module.params.get('dirsrv_cert_files')
options.http_cert_files = ansible_module.params.get('http_cert_files')
options.pkinit_cert_files = ansible_module.params.get('pkinit_cert_files')
options.dirsrv_pin = ansible_module.params.get('dirsrv_pin'),
options.http_pin = ansible_module.params.get('http_pin'),
options.pkinit_pin = ansible_module.params.get('pkinit_pin'),
options.dirsrv_cert_name = ansible_module.params.get('dirsrv_cert_name'),
options.http_cert_name = ansible_module.params.get('http_cert_name'),
options.pkinit_cert_name = ansible_module.params.get('pkinit_cert_name'),
options.dirsrv_pin = ansible_module.params.get('dirsrv_pin')
options.http_pin = ansible_module.params.get('http_pin')
options.pkinit_pin = ansible_module.params.get('pkinit_pin')
options.dirsrv_cert_name = ansible_module.params.get('dirsrv_cert_name')
options.http_cert_name = ansible_module.params.get('http_cert_name')
options.pkinit_cert_name = ansible_module.params.get('pkinit_cert_name')
### client ###
# mkhomedir
options.ntp_servers = ansible_module.params.get('ntp_servers')
@@ -562,7 +562,7 @@ def main():
try:
check_zone_overlap(options.domain_name, False)
except ValueError as e:
ansible_module.fail_json(str(e))
ansible_module.fail_json(msg=str(e))
# dm_password
with redirect_stdout(ansible_log):