| 1 |
# Copyright: (c) 2023, Ansible Project |
| 2 |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 3 |
|
| 4 |
DOCUMENTATION: |
| 5 |
module: debug_ldap_client |
| 6 |
short_description: Get host information for debugging LDAP connections |
| 7 |
description: |
| 8 |
- Get information about the current Ansible host to debug LDAP connections |
| 9 |
and their capabilities. |
| 10 |
version_added: 1.1.0 |
| 11 |
options: {} |
| 12 |
notes: |
| 13 |
- See |
| 14 |
R(LDAP connection help,ansible_collections.microsoft.ad.docsite.guide_ldap_connection) |
| 15 |
for more information about LDAP connections. |
| 16 |
- The return values are not part of any contract and can change in the |
| 17 |
future. It is meant to give a snapshot of the Ansible host that can help |
| 18 |
debug LDAP connection issues and not be used as part of a normal playbook. |
| 19 |
extends_documentation_fragment: |
| 20 |
- ansible.builtin.action_common_attributes |
| 21 |
- ansible.builtin.action_common_attributes.flow |
| 22 |
attributes: |
| 23 |
check_mode: |
| 24 |
support: full |
| 25 |
diff_mode: |
| 26 |
support: none |
| 27 |
platform: |
| 28 |
platforms: |
| 29 |
- posix |
| 30 |
action: |
| 31 |
support: full |
| 32 |
async: |
| 33 |
support: full |
| 34 |
bypass_host_loop: |
| 35 |
support: none |
| 36 |
author: |
| 37 |
- Jordan Borean (@jborean93) |
| 38 |
|
| 39 |
EXAMPLES: | |
| 40 |
- name: Get information about the Ansible host's LDAP capabilities |
| 41 |
microsoft.ad.debug_ldap_client: |
| 42 |
|
| 43 |
RETURN: |
| 44 |
dns: |
| 45 |
description: |
| 46 |
- Details about the SRV LDAP server lookup. |
| 47 |
- The values will only be populated if dnspython is installed. |
| 48 |
returned: always |
| 49 |
type: complex |
| 50 |
contains: |
| 51 |
default_port: |
| 52 |
description: |
| 53 |
- The default port of the SRV record chosen. |
| 54 |
returned: dnspython is installed |
| 55 |
type: int |
| 56 |
sample: 389 |
| 57 |
default_server: |
| 58 |
description: |
| 59 |
- The default hostname of the SRV record chosen. |
| 60 |
returned: dnspython is installed |
| 61 |
type: str |
| 62 |
sample: dc01.domain.com |
| 63 |
exception: |
| 64 |
description: |
| 65 |
- Any exceptions that occurred when getting the SRV records. |
| 66 |
returned: dnspython is installed |
| 67 |
type: str |
| 68 |
sample: "" |
| 69 |
records: |
| 70 |
description: |
| 71 |
- The SRV records that were found during the LDAP server lookup. |
| 72 |
returned: dnspython is installed |
| 73 |
type: list |
| 74 |
contains: |
| 75 |
port: |
| 76 |
description: |
| 77 |
- The port of this SRV record. |
| 78 |
returned: dnspython is installed and default_realm is found |
| 79 |
type: int |
| 80 |
sample: 389 |
| 81 |
priority: |
| 82 |
description: |
| 83 |
- The record priority value. |
| 84 |
returned: dnspython is installed and default_realm is found |
| 85 |
type: int |
| 86 |
sample: 0 |
| 87 |
target: |
| 88 |
description: |
| 89 |
- The target name of the SRV record. |
| 90 |
returned: dnspython is installed and default_realm is found |
| 91 |
type: str |
| 92 |
sample: dc01.domain.com. |
| 93 |
weight: |
| 94 |
description: |
| 95 |
- The record weight value. |
| 96 |
returned: dnspython is installed and default_realm is found |
| 97 |
type: int |
| 98 |
sample: 100 |
| 99 |
kerberos: |
| 100 |
description: |
| 101 |
- Details about the host Kerberos setup. |
| 102 |
- The values will only be populated if krb5 is installed. |
| 103 |
returned: always |
| 104 |
type: complex |
| 105 |
contains: |
| 106 |
default_cc: |
| 107 |
description: |
| 108 |
- Details about the default Kerberos credential cache. |
| 109 |
returned: krb5 is installed |
| 110 |
type: complex |
| 111 |
contains: |
| 112 |
creds: |
| 113 |
description: |
| 114 |
- A list of credentials that is stored in the ccache. |
| 115 |
- This requires C(krb5 >= 0.5.0) to be populated. |
| 116 |
returned: krb5 is installed |
| 117 |
type: complex |
| 118 |
contains: |
| 119 |
client: |
| 120 |
description: |
| 121 |
- The client principal name the credential is for. |
| 122 |
returned: krb5 >= 0.5.0 is installed |
| 123 |
type: str |
| 124 |
sample: [email protected] |
| 125 |
server: |
| 126 |
description: |
| 127 |
- The server principal name the credential is for. |
| 128 |
returned: krb5 >= 0.5.0 is installed |
| 129 |
type: str |
| 130 |
sample: krbtgt/[email protected] |
| 131 |
exception: |
| 132 |
description: |
| 133 |
- Any exceptions that occurred when getting the ccache |
| 134 |
information. |
| 135 |
returned: krb5 is installed |
| 136 |
type: str |
| 137 |
sample: "" |
| 138 |
name: |
| 139 |
description: |
| 140 |
- The default ccache type and name. |
| 141 |
returned: krb5 is installed |
| 142 |
type: str |
| 143 |
sample: FILE:/tmp/krb5cc_1000 |
| 144 |
principal: |
| 145 |
description: |
| 146 |
- The default principal of the ccache |
| 147 |
returned: krb5 is installed |
| 148 |
type: str |
| 149 |
sample: [email protected] |
| 150 |
default_realm: |
| 151 |
description: |
| 152 |
- The default_realm as reported by Kerberos. |
| 153 |
- This value is used for the automatic server lookup. |
| 154 |
returned: krb5 is installed |
| 155 |
type: str |
| 156 |
sample: domain.com |
| 157 |
exception: |
| 158 |
description: |
| 159 |
- Exception details if the default realm could not be retrieved. |
| 160 |
returned: krb5 is installed |
| 161 |
type: str |
| 162 |
sample: "" |
| 163 |
packages: |
| 164 |
description: |
| 165 |
- All the packages used by this collection for LDAP connections and their |
| 166 |
installed versions. |
| 167 |
- If the package is not installed, or failed to import, the value is the |
| 168 |
traceback from the import process. |
| 169 |
- This can be used to determine the availability of optional features like |
| 170 |
Kerberos authentication or server lookups. |
| 171 |
returned: always |
| 172 |
type: complex |
| 173 |
contains: |
| 174 |
dnspython: |
| 175 |
description: |
| 176 |
- The installed version of C(dnspython) or the import error if not |
| 177 |
installed. |
| 178 |
returned: always |
| 179 |
type: str |
| 180 |
sample: '2.3.0' |
| 181 |
dpapi_ng: |
| 182 |
description: |
| 183 |
- The installed version of C(dpapi-ng) or the import error if not |
| 184 |
installed. |
| 185 |
returned: always |
| 186 |
type: str |
| 187 |
sample: '0.1.0' |
| 188 |
krb5: |
| 189 |
description: |
| 190 |
- The installed version of C(krb5) or the import error if not |
| 191 |
installed. |
| 192 |
returned: always |
| 193 |
type: str |
| 194 |
sample: '0.5.0' |
| 195 |
pyspnego: |
| 196 |
description: |
| 197 |
- The installed version of C(pyspnego) or the import error if not |
| 198 |
installed. |
| 199 |
returned: always |
| 200 |
type: str |
| 201 |
sample: '0.8.0' |
| 202 |
sansldap: |
| 203 |
description: |
| 204 |
- The installed version of C(sansldap) or the import error if not |
| 205 |
installed. |
| 206 |
returned: always |
| 207 |
type: str |
| 208 |
sample: '0.1.0' |