mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +00:00
ipa[server,replica,client]: flake8 and pylint fixes
These are white space and line length changes to calm down pylint and flake8.
This commit is contained in:
@@ -118,26 +118,27 @@ from ansible.module_utils.ansible_ipa_replica import (
|
||||
custodiainstance
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
ansible_module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
### basic ###
|
||||
argument_spec=dict(
|
||||
# basic
|
||||
pki_config_override=dict(required=False),
|
||||
#### server ###
|
||||
# server
|
||||
setup_ca=dict(required=False, type='bool'),
|
||||
setup_kra=dict(required=False, type='bool'),
|
||||
no_pkinit=dict(required=False, type='bool'),
|
||||
#### certificate system ###
|
||||
# certificate system
|
||||
subject_base=dict(required=True),
|
||||
#### additional ###
|
||||
# additional
|
||||
ccache=dict(required=True),
|
||||
_ca_enabled=dict(required=False, type='bool'),
|
||||
_ca_file=dict(required=False),
|
||||
_kra_enabled=dict(required=False, type='bool'),
|
||||
_kra_host_name=dict(required=False),
|
||||
_dirsrv_pkcs12_info = dict(required=False),
|
||||
_pkinit_pkcs12_info = dict(required=False),
|
||||
_top_dir = dict(required=True),
|
||||
_dirsrv_pkcs12_info=dict(required=False),
|
||||
_pkinit_pkcs12_info=dict(required=False),
|
||||
_top_dir=dict(required=True),
|
||||
_ca_subject=dict(required=True),
|
||||
_subject_base=dict(required=True),
|
||||
dirman_password=dict(required=True, no_log=True),
|
||||
@@ -146,7 +147,7 @@ def main():
|
||||
config_ca_host_name=dict(required=True),
|
||||
config_ips=dict(required=False, type='list', default=[]),
|
||||
),
|
||||
supports_check_mode = True,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
ansible_module._ansible_debug = True
|
||||
@@ -155,27 +156,29 @@ def main():
|
||||
# get parameters #
|
||||
|
||||
options = installer
|
||||
### basic ###
|
||||
# basic
|
||||
options.pki_config_override = ansible_module.params.get(
|
||||
'pki_config_override')
|
||||
### server ###
|
||||
# server
|
||||
options.setup_ca = ansible_module.params.get('setup_ca')
|
||||
options.setup_kra = ansible_module.params.get('setup_kra')
|
||||
options.no_pkinit = ansible_module.params.get('no_pkinit')
|
||||
### certificate system ###
|
||||
# certificate system
|
||||
options.subject_base = ansible_module.params.get('subject_base')
|
||||
if options.subject_base is not None:
|
||||
options.subject_base = DN(options.subject_base)
|
||||
### additional ###
|
||||
# additional
|
||||
ccache = ansible_module.params.get('ccache')
|
||||
os.environ['KRB5CCNAME'] = ccache
|
||||
#os.environ['KRB5CCNAME'] = ansible_module.params.get('installer_ccache')
|
||||
#installer._ccache = ansible_module.params.get('installer_ccache')
|
||||
# os.environ['KRB5CCNAME'] = ansible_module.params.get('installer_ccache')
|
||||
# installer._ccache = ansible_module.params.get('installer_ccache')
|
||||
ca_enabled = ansible_module.params.get('_ca_enabled')
|
||||
kra_enabled = ansible_module.params.get('_kra_enabled')
|
||||
kra_host_name = ansible_module.params.get('_kra_host_name')
|
||||
installer._dirsrv_pkcs12_info = ansible_module.params.get('_dirsrv_pkcs12_info')
|
||||
installer._pkinit_pkcs12_info = ansible_module.params.get('_pkinit_pkcs12_info')
|
||||
installer._dirsrv_pkcs12_info = ansible_module.params.get(
|
||||
'_dirsrv_pkcs12_info')
|
||||
installer._pkinit_pkcs12_info = ansible_module.params.get(
|
||||
'_pkinit_pkcs12_info')
|
||||
options._top_dir = ansible_module.params.get('_top_dir')
|
||||
options._ca_subject = ansible_module.params.get('_ca_subject')
|
||||
if options._ca_subject is not None:
|
||||
@@ -185,7 +188,8 @@ def main():
|
||||
options._subject_base = DN(options._subject_base)
|
||||
dirman_password = ansible_module.params.get('dirman_password')
|
||||
config_setup_ca = ansible_module.params.get('config_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')
|
||||
config_ca_host_name = ansible_module.params.get('config_ca_host_name')
|
||||
config_ips = ansible_module_get_parsed_ip_addresses(ansible_module,
|
||||
"config_ips")
|
||||
@@ -218,7 +222,7 @@ def main():
|
||||
# There is a api.Backend.ldap2.connect call somewhere in ca, ds, dns or
|
||||
# ntpinstance
|
||||
api.Backend.ldap2.connect()
|
||||
#conn.connect(ccache=ccache)
|
||||
# conn.connect(ccache=ccache)
|
||||
|
||||
ansible_log.debug("-- INSTALL CA --")
|
||||
|
||||
@@ -246,5 +250,6 @@ def main():
|
||||
|
||||
ansible_module.exit_json(changed=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user