mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
ansible-test: Do not use automatic field numbering specification
Automatic field numbering specification is not allowed by ansible-test.
This commit is contained in:
@@ -236,7 +236,8 @@ def main():
|
||||
except Exception as e:
|
||||
logger.debug("config_show failed %s", e, exc_info=True)
|
||||
module.fail_json(
|
||||
"Failed to retrieve CA certificate subject base: {}".format(e),
|
||||
"Failed to retrieve CA certificate subject base: "
|
||||
"{0}".format(e),
|
||||
rval=CLIENT_INSTALL_ERROR)
|
||||
else:
|
||||
subject_base = str(DN(config['ipacertificatesubjectbase'][0]))
|
||||
|
||||
@@ -241,7 +241,7 @@ def main():
|
||||
config=krb_name)
|
||||
except RuntimeError as e:
|
||||
module.fail_json(
|
||||
msg="Kerberos authentication failed: {}".format(e))
|
||||
msg="Kerberos authentication failed: {0}".format(e))
|
||||
|
||||
elif keytab:
|
||||
join_args.append("-f")
|
||||
@@ -254,10 +254,10 @@ def main():
|
||||
attempts=kinit_attempts)
|
||||
except GSSError as e:
|
||||
module.fail_json(
|
||||
msg="Kerberos authentication failed: {}".format(e))
|
||||
msg="Kerberos authentication failed: {0}".format(e))
|
||||
else:
|
||||
module.fail_json(
|
||||
msg="Keytab file could not be found: {}".format(keytab))
|
||||
msg="Keytab file could not be found: {0}".format(keytab))
|
||||
|
||||
elif password:
|
||||
join_args.append("-w")
|
||||
|
||||
@@ -432,7 +432,7 @@ def main():
|
||||
if options.ca_cert_files is not None:
|
||||
for value in options.ca_cert_files:
|
||||
if not isinstance(value, list):
|
||||
raise ValueError("Expected list, got {!r}".format(value))
|
||||
raise ValueError("Expected list, got {0!r}".format(value))
|
||||
# this is what init() does
|
||||
value = value[-1]
|
||||
if not os.path.exists(value):
|
||||
@@ -575,13 +575,13 @@ def main():
|
||||
hostname_source = "Machine's FQDN"
|
||||
if hostname != hostname.lower():
|
||||
raise ScriptError(
|
||||
"Invalid hostname '{}', must be lower-case.".format(hostname),
|
||||
"Invalid hostname '{0}', must be lower-case.".format(hostname),
|
||||
rval=CLIENT_INSTALL_ERROR
|
||||
)
|
||||
|
||||
if hostname in ('localhost', 'localhost.localdomain'):
|
||||
raise ScriptError(
|
||||
"Invalid hostname, '{}' must not be used.".format(hostname),
|
||||
"Invalid hostname, '{0}' must not be used.".format(hostname),
|
||||
rval=CLIENT_INSTALL_ERROR)
|
||||
|
||||
if hasattr(constants, "MAXHOSTNAMELEN"):
|
||||
@@ -589,7 +589,7 @@ def main():
|
||||
validate_hostname(hostname, maxlen=constants.MAXHOSTNAMELEN)
|
||||
except ValueError as e:
|
||||
raise ScriptError(
|
||||
'invalid hostname: {}'.format(e),
|
||||
'invalid hostname: {0}'.format(e),
|
||||
rval=CLIENT_INSTALL_ERROR)
|
||||
|
||||
if hasattr(tasks, "is_nosssd_supported"):
|
||||
@@ -695,7 +695,7 @@ def main():
|
||||
rval=CLIENT_INSTALL_ERROR)
|
||||
if ret == ipadiscovery.NOT_FQDN:
|
||||
raise ScriptError(
|
||||
"{} is not a fully-qualified hostname".format(hostname),
|
||||
"{0} is not a fully-qualified hostname".format(hostname),
|
||||
rval=CLIENT_INSTALL_ERROR)
|
||||
if ret in (ipadiscovery.NO_LDAP_SERVER, ipadiscovery.NOT_IPA_SERVER) \
|
||||
or not ds.domain:
|
||||
|
||||
Reference in New Issue
Block a user