mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Add missing whitespace around arithmetic operator
This patch is needed to pass Automation Hub tests.
This commit is contained in:
@@ -439,7 +439,7 @@ def find_dnsrecord(module, name):
|
||||
This function may raise ipalib_errors.NotFound in some cases,
|
||||
and it should be handled by the caller.
|
||||
"""
|
||||
domain_name = name[name.find(".")+1:]
|
||||
domain_name = name[name.find(".") + 1:]
|
||||
host_name = name[:name.find(".")]
|
||||
|
||||
_args = {
|
||||
@@ -1231,7 +1231,7 @@ def main():
|
||||
}])
|
||||
|
||||
if len(dnsrecord_a_add) > 0 or len(dnsrecord_aaaa_add) > 0:
|
||||
domain_name = name[name.find(".")+1:]
|
||||
domain_name = name[name.find(".") + 1:]
|
||||
host_name = name[:name.find(".")]
|
||||
|
||||
_args = {"idnsname": host_name}
|
||||
@@ -1248,7 +1248,7 @@ def main():
|
||||
"dnsrecord_add", _args])
|
||||
|
||||
if len(dnsrecord_a_del) > 0 or len(dnsrecord_aaaa_del) > 0:
|
||||
domain_name = name[name.find(".")+1:]
|
||||
domain_name = name[name.find(".") + 1:]
|
||||
host_name = name[:name.find(".")]
|
||||
|
||||
# There seems to be an issue with dnsrecord_del (not
|
||||
@@ -1364,7 +1364,7 @@ def main():
|
||||
|
||||
if "arecord" in dnsrecord_args or \
|
||||
"aaaarecord" in dnsrecord_args:
|
||||
domain_name = name[name.find(".")+1:]
|
||||
domain_name = name[name.find(".") + 1:]
|
||||
host_name = name[:name.find(".")]
|
||||
dnsrecord_args["idnsname"] = host_name
|
||||
|
||||
|
||||
@@ -699,8 +699,8 @@ def check_certmapdata(data):
|
||||
|
||||
i = data.find("<I>", 4)
|
||||
s = data.find("<S>", i) # pylint: disable=invalid-name
|
||||
issuer = data[i+3:s]
|
||||
subject = data[s+3:]
|
||||
issuer = data[i + 3:s]
|
||||
subject = data[s + 3:]
|
||||
|
||||
if i < 0 or s < 0 or "CN" not in issuer or "CN" not in subject:
|
||||
return False
|
||||
|
||||
@@ -182,7 +182,7 @@ def main():
|
||||
if password is None and admin_keytab is None:
|
||||
module.fail_json(msg="Password or admin_keytab is needed")
|
||||
|
||||
client_domain = hostname[hostname.find(".")+1:]
|
||||
client_domain = hostname[hostname.find(".") + 1:]
|
||||
nolog = tuple()
|
||||
env = {'PATH': SECURE_PATH}
|
||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||
|
||||
@@ -159,7 +159,7 @@ def main():
|
||||
options.krb5_offline_passwords = not options.no_krb5_offline_passwords
|
||||
|
||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||
client_domain = hostname[hostname.find(".")+1:]
|
||||
client_domain = hostname[hostname.find(".") + 1:]
|
||||
|
||||
if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server,
|
||||
options, client_domain, hostname):
|
||||
|
||||
@@ -322,7 +322,7 @@ def main():
|
||||
if options.domain_name is None and options.servers is not None:
|
||||
if len(options.servers) > 0:
|
||||
options.domain_name = options.servers[0][
|
||||
options.servers[0].find(".")+1:]
|
||||
options.servers[0].find(".") + 1:]
|
||||
|
||||
try:
|
||||
self = options
|
||||
@@ -704,7 +704,7 @@ def main():
|
||||
cli_domain_source = ds.domain_source
|
||||
logger.debug("will use discovered domain: %s", cli_domain)
|
||||
|
||||
client_domain = hostname[hostname.find(".")+1:]
|
||||
client_domain = hostname[hostname.find(".") + 1:]
|
||||
|
||||
if ret in (ipadiscovery.NO_LDAP_SERVER, ipadiscovery.NOT_IPA_SERVER) \
|
||||
or not ds.server:
|
||||
|
||||
@@ -134,7 +134,7 @@ def main():
|
||||
kdc = module.params.get('kdc')
|
||||
kinit_attempts = module.params.get('kinit_attempts')
|
||||
|
||||
client_domain = hostname[hostname.find(".")+1:]
|
||||
client_domain = hostname[hostname.find(".") + 1:]
|
||||
host_principal = 'host/%s@%s' % (hostname, realm)
|
||||
sssd = True
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ else:
|
||||
# See ipapython/version.py
|
||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
||||
VERSION.split(".", 2)]
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR * 10000 + IPA_MINOR * 100 + IPA_RELEASE
|
||||
else:
|
||||
IPA_PYTHON_VERSION = NUM_VERSION
|
||||
|
||||
|
||||
@@ -252,7 +252,8 @@ def main():
|
||||
|
||||
# If not defined, set domain from server name
|
||||
if installer.domain_name is None and installer.server is not None:
|
||||
installer.domain_name = installer.server[installer.server.find(".")+1:]
|
||||
installer.domain_name = \
|
||||
installer.server[installer.server.find(".") + 1:]
|
||||
# If not defined, set realm from domain name
|
||||
if installer.realm_name is None and installer.domain_name is not None:
|
||||
installer.realm_name = installer.domain_name.upper()
|
||||
|
||||
@@ -65,7 +65,7 @@ else:
|
||||
# See ipapython/version.py
|
||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
||||
VERSION.split(".", 2)]
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR * 10000 + IPA_MINOR * 100 + IPA_RELEASE
|
||||
else:
|
||||
IPA_PYTHON_VERSION = NUM_VERSION
|
||||
|
||||
|
||||
@@ -926,7 +926,7 @@ def main():
|
||||
host_name = host_name.lower()
|
||||
|
||||
if not options.domain_name:
|
||||
domain_name = host_name[host_name.find(".")+1:]
|
||||
domain_name = host_name[host_name.find(".") + 1:]
|
||||
try:
|
||||
validate_domain_name(domain_name)
|
||||
except ValueError as e:
|
||||
|
||||
@@ -64,7 +64,7 @@ else:
|
||||
# See ipapython/version.py
|
||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
||||
VERSION.split(".", 2)]
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
||||
IPA_PYTHON_VERSION = IPA_MAJOR * 10000 + IPA_MINOR * 100 + IPA_RELEASE
|
||||
else:
|
||||
IPA_PYTHON_VERSION = NUM_VERSION
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ def gen_module_docs(module_in):
|
||||
# print("%s: Bad argument dict line '%s'" % (module_in,
|
||||
# stripped))
|
||||
while ")," not in stripped and i < len(in_lines) - 1:
|
||||
next_stripped = in_lines[i+1].strip()
|
||||
next_stripped = in_lines[i + 1].strip()
|
||||
if not next_stripped.startswith("# "):
|
||||
stripped += next_stripped
|
||||
i += 1
|
||||
|
||||
Reference in New Issue
Block a user