mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-15 14:02:02 +00:00
pylint: Fix pylint issues with modules.
Fix pylint warnings raised by enabling linter on ansible-freeipa roles.
This commit is contained in:
@@ -199,7 +199,9 @@ def main():
|
||||
|
||||
ansible_log.debug("-- CUSTODIA IMPORT DM PASSWORD --")
|
||||
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(custodia.import_dm_password)
|
||||
# pylint: enable=deprecated-method
|
||||
if "master_host_name" in argspec.args:
|
||||
custodia.import_dm_password(config.master_host_name)
|
||||
else:
|
||||
|
||||
@@ -56,8 +56,7 @@ from ansible.module_utils.ansible_ipa_replica import (
|
||||
|
||||
def main():
|
||||
ansible_module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
),
|
||||
argument_spec={},
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
|
||||
@@ -316,7 +316,9 @@ def main():
|
||||
ansible_log.debug("-- CONFIGURE DIRSRV --")
|
||||
# Configure dirsrv
|
||||
with redirect_stdout(ansible_log):
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(install_replica_ds)
|
||||
# pylint: enable=deprecated-method
|
||||
if "promote" in argspec.args:
|
||||
ds = install_replica_ds(config, options, ca_enabled,
|
||||
remote_api,
|
||||
@@ -336,9 +338,13 @@ def main():
|
||||
ca_file=cafile,
|
||||
pkcs12_info=dirsrv_pkcs12_info)
|
||||
|
||||
# pylint: disable=deprecated-method
|
||||
ansible_log.debug("-- INSTALL DNS RECORDS --")
|
||||
# pylint: enable=deprecated-method
|
||||
# Always try to install DNS records
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(install_dns_records)
|
||||
# pylint: enable=deprecated-method
|
||||
if "fstore" not in argspec.args:
|
||||
install_dns_records(config, options, remote_api)
|
||||
else:
|
||||
|
||||
@@ -202,7 +202,9 @@ def main():
|
||||
create_ipa_conf(fstore, config, ca_enabled,
|
||||
master=config.master_host_name)
|
||||
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(install_http)
|
||||
# pylint: enable=deprecated-method
|
||||
if "promote" in argspec.args:
|
||||
install_http(
|
||||
config,
|
||||
|
||||
@@ -161,7 +161,9 @@ def main():
|
||||
ansible_log.debug("-- INSTALL_KRB --")
|
||||
|
||||
with redirect_stdout(ansible_log):
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(install_krb)
|
||||
# pylint: enable=deprecated-method
|
||||
if "promote" in argspec.args:
|
||||
install_krb(
|
||||
config,
|
||||
|
||||
@@ -286,7 +286,9 @@ def main():
|
||||
# asks for HTTP certificate in newer ipa versions. In these versions
|
||||
# create_ipa_conf has the additional master argument.
|
||||
change_master_for_certmonger = False
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(create_ipa_conf)
|
||||
# pylint: enable=deprecated-method
|
||||
if "master" in argspec.args:
|
||||
change_master_for_certmonger = True
|
||||
|
||||
@@ -418,7 +420,9 @@ def main():
|
||||
# check selinux status, http and DS ports, NTP conflicting services
|
||||
try:
|
||||
with redirect_stdout(ansible_log):
|
||||
# pylint: disable=deprecated-method
|
||||
argspec = inspect.getargspec(common_check)
|
||||
# pylint: enable=deprecated-method
|
||||
if "skip_mem_check" in argspec.args:
|
||||
common_check(options.no_ntp, options.skip_mem_check,
|
||||
options.setup_ca)
|
||||
|
||||
Reference in New Issue
Block a user