mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 11:54:47 +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:
@@ -65,30 +65,31 @@ from ansible.module_utils.ansible_ipa_server import (
|
||||
dsinstance, ntpinstance, IPAAPI_USER
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
ansible_module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
### basic ###
|
||||
argument_spec=dict(
|
||||
# basic
|
||||
dm_password=dict(required=True, no_log=True),
|
||||
password=dict(required=True, no_log=True),
|
||||
domain=dict(required=True),
|
||||
realm=dict(required=True),
|
||||
hostname=dict(required=False),
|
||||
### server ###
|
||||
# server
|
||||
idstart=dict(required=True, type='int'),
|
||||
idmax=dict(required=True, type='int'),
|
||||
no_hbac_allow=dict(required=False, type='bool', default=False),
|
||||
no_pkinit=dict(required=False, type='bool', default=False),
|
||||
dirsrv_config_file=dict(required=False),
|
||||
### ssl certificate ###
|
||||
# ssl certificate
|
||||
dirsrv_cert_files=dict(required=False, type='list', default=[]),
|
||||
_dirsrv_pkcs12_info=dict(required=False),
|
||||
### certificate system ###
|
||||
# certificate system
|
||||
external_cert_files=dict(required=False, type='list', default=[]),
|
||||
subject_base=dict(required=False),
|
||||
ca_subject=dict(required=False),
|
||||
|
||||
### additional ###
|
||||
# additional
|
||||
setup_ca=dict(required=False, type='bool', default=False),
|
||||
),
|
||||
)
|
||||
@@ -98,28 +99,29 @@ def main():
|
||||
|
||||
# set values ############################################################
|
||||
|
||||
### basic ###
|
||||
# basic
|
||||
options.dm_password = ansible_module.params.get('dm_password')
|
||||
options.domain_name = ansible_module.params.get('domain')
|
||||
options.realm_name = ansible_module.params.get('realm')
|
||||
options.host_name = ansible_module.params.get('hostname')
|
||||
### server ###
|
||||
# server
|
||||
options.idstart = ansible_module.params.get('idstart')
|
||||
options.idmax = ansible_module.params.get('idmax')
|
||||
options.no_pkinit = ansible_module.params.get('no_pkinit')
|
||||
options.no_hbac_allow = ansible_module.params.get('no_hbac_allow')
|
||||
options.dirsrv_config_file = ansible_module.params.get('dirsrv_config_file')
|
||||
options.dirsrv_config_file = ansible_module.params.get(
|
||||
'dirsrv_config_file')
|
||||
options._dirsrv_pkcs12_info = ansible_module.params.get(
|
||||
'_dirsrv_pkcs12_info')
|
||||
### ssl certificate ###
|
||||
# ssl certificate
|
||||
options.dirsrv_cert_files = ansible_module.params.get('dirsrv_cert_files')
|
||||
### certificate system ###
|
||||
# certificate system
|
||||
options.external_cert_files = ansible_module.params.get(
|
||||
'external_cert_files')
|
||||
options.subject_base = ansible_module.params.get('subject_base')
|
||||
options.ca_subject = ansible_module.params.get('ca_subject')
|
||||
|
||||
### additional ###
|
||||
# additional
|
||||
options.setup_ca = ansible_module.params.get('setup_ca')
|
||||
|
||||
# init ##################################################################
|
||||
@@ -145,9 +147,9 @@ 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
|
||||
_dirsrv_pkcs12_info = None
|
||||
|
||||
with redirect_stdout(ansible_log):
|
||||
ds.create_instance(options.realm_name, options.host_name,
|
||||
@@ -180,5 +182,6 @@ def main():
|
||||
|
||||
ansible_module.exit_json(changed=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user