ripclawffb.helix_core.helix_core_ldap module – Manage LDAP configurations on Perforce Helix Core
Note
This module is part of the ripclawffb.helix_core collection (version 1.3.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install ripclawffb.helix_core.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ripclawffb.helix_core.helix_core_ldap.
New in ripclawffb.helix_core 1.1.0
Synopsis
This module allows you to create, modify, or delete LDAP configurations on Perforce Helix Core.
Supports various bind methods (simple, search, sasl) and encryption types.
Requirements
The below requirements are needed on the host that executes this module.
P4Python pip module is required
Parameters
Parameter |
Comments |
|---|---|
The attribute used for the user’s email address. |
|
The attribute used for the user’s full name. |
|
The attribute used for the user ID. |
|
The method used to bind to the LDAP server. Choices:
|
|
Character set used for translation of unicode files Can also use ‘P4CHARSET’ environment variable Default: |
|
The encryption method used to connect to the LDAP server. Choices:
|
|
The base DN for searching groups. |
|
The filter used to search for groups. |
|
The LDAP server hostname or IP address. |
|
The name of the LDAP configuration. |
|
specific options for the LDAP configuration. Choices:
|
|
The login password Can also use ‘P4PASSWD’ environment variable |
|
The LDAP server port. |
|
The base DN for searching users. Required if bind_method is ‘search’. |
|
The DN used to bind to the LDAP server for searching. |
|
The search filter used to find users (e.g., (uid=%user%)). Required if bind_method is ‘search’. |
|
The password used to bind to the LDAP server for searching. |
|
The hostname/ip and port of the server (perforce:1666) Can also use ‘P4PORT’ environment variable |
|
The pattern used for simple binding (e.g., uid=%user%,ou=users,dc=example,dc=com). Required if bind_method is ‘simple’. |
|
Whether the LDAP configuration should exist or not. Choices:
|
|
A user with access to perform this operation Can also use ‘P4USER’ environment variable |
See Also
See also
- Helix Core LDAP
Manage LDAP configurations
- P4Python Pip Module
Python module to interact with Helix Core
Examples
- name: Create LDAP configuration with simple bind
ripclawffb.helix_core.helix_core_ldap:
name: simple_ldap
host: ldap.example.com
port: 389
encryption: none
bind_method: simple
simple_pattern: "uid=%user%,ou=users,dc=example,dc=com"
options:
- nodowncase
- getattrs
server: '1666'
user: bruno
password: ''
- name: Create LDAP configuration with search bind
ripclawffb.helix_core.helix_core_ldap:
name: search_ldap
host: ldap.example.com
port: 636
encryption: ssl
bind_method: search
search_base_dn: "ou=users,dc=example,dc=com"
search_filter: "(uid=%user%)"
search_bind_dn: "cn=admin,dc=example,dc=com"
search_passwd: "secret_password"
options:
- downcase
- getattrs
server: '1666'
user: bruno
password: ''
- name: Remove LDAP configuration
ripclawffb.helix_core.helix_core_ldap:
name: simple_ldap
state: absent
host: ldap.example.com
port: 389
server: '1666'
user: bruno
password: ''
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The action performed on the resource. Returned: always Can only return:
Sample: |
|
Whether any changes were made to the LDAP configuration. Returned: always Sample: |
|
List of fields that were changed. Returned: always Sample: |
|
A dictionary containing ‘before’ and ‘after’ state of the resource. Returned: when diff mode is enabled |
|
The state of the resource after the action. Returned: success |
|
The state of the resource before the action. Returned: success |
|
The LDAP configuration specification. Returned: always Sample: |