summaryrefslogtreecommitdiffstats
path: root/ansible_collections/microsoft/ad/plugins/action
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:35 +0000
commit7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch)
treeefb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/microsoft/ad/plugins/action
parentReleasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff)
downloadansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz
ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/microsoft/ad/plugins/action')
-rw-r--r--ansible_collections/microsoft/ad/plugins/action/debug_ldap_client.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ansible_collections/microsoft/ad/plugins/action/debug_ldap_client.py b/ansible_collections/microsoft/ad/plugins/action/debug_ldap_client.py
index a33f21dda..fbe990f4e 100644
--- a/ansible_collections/microsoft/ad/plugins/action/debug_ldap_client.py
+++ b/ansible_collections/microsoft/ad/plugins/action/debug_ldap_client.py
@@ -52,7 +52,9 @@ class ActionModule(ActionBase):
"dns": dns_info,
"kerberos": kerb_info,
"packages": {
- "dnspython": self._import_lib("dns.resolver", package_name="dnspython"),
+ "dnspython": self._import_lib(
+ "dns.resolver", package_name="dnspython"
+ ),
"dpapi_ng": self._import_lib("dpapi_ng", package_name="dpapi-ng"),
"krb5": self._import_lib("krb5"),
"pyspnego": self._import_lib("spnego", package_name="pyspnego"),
@@ -77,8 +79,6 @@ class ActionModule(ActionBase):
ctx = krb5.init_context()
except Exception:
res["exception"] = traceback.format_exc()
-
- if not ctx:
return res
try:
@@ -106,8 +106,6 @@ class ActionModule(ActionBase):
default_cc = krb5.cc_default(ctx)
except Exception:
res["exception"] = traceback.format_exc()
-
- if not default_cc:
return res
try:
@@ -154,7 +152,9 @@ class ActionModule(ActionBase):
}
)
- highest_record = next(iter(sorted(records, key=lambda k: (k["priority"], -k["weight"]))), None)
+ highest_record = next(
+ iter(sorted(records, key=lambda k: (k["priority"], -k["weight"]))), None
+ )
if highest_record:
res["default_server"] = highest_record["target"].rstrip(".")
res["default_port"] = highest_record["port"]