File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ldapmod.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlZddlZddlZddlmZ zddlZddlZdZ W n e y+ dZ Y nw e�e�Z dZdd� Zdd d �Zdd� Z dd d�ZG dd� d�ZdS )at Salt interface to LDAP commands :depends: - ldap Python module :configuration: In order to connect to LDAP, certain configuration is required in the minion config on the LDAP server. The minimum configuration items that must be set are: .. code-block:: yaml ldap.basedn: dc=acme,dc=com (example values, adjust to suit) If your LDAP server requires authentication then you must also set: .. code-block:: yaml ldap.anonymous: False ldap.binddn: admin ldap.bindpw: password In addition, the following optional values may be set: .. code-block:: yaml ldap.server: localhost (default=localhost, see warning below) ldap.port: 389 (default=389, standard port) ldap.tls: False (default=False, no TLS) ldap.no_verify: False (default=False, verify TLS) ldap.anonymous: True (default=True, bind anonymous) ldap.scope: 2 (default=2, ldap.SCOPE_SUBTREE) ldap.attrs: [saltAttr] (default=None, return all attributes) .. warning:: At the moment this module only recommends connection to LDAP services listening on ``localhost``. This is deliberate to avoid the potentially dangerous situation of multiple minions sending identical update commands to the same LDAP server. It's easy enough to override this behavior, but badness may ensue - you have been warned. � N)�CommandExecutionErrorTF�ldapc C s t rtS dS )z9 Only load this module if the ldap config is set )FzGThe ldapmod execution module cannot be loaded: ldap config not present.)�HAS_LDAP�__virtualname__� r r �H/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/ldapmod.py�__virtual__>