huawei.enterprise.hw_enterprise_ldap_server module – IDAP Service operations for Huawei Enterprise Storage
Note
This module is part of the huawei.enterprise collection (version 2.0.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 huawei.enterprise.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: huawei.enterprise.hw_enterprise_ldap_server.
Synopsis
Create, modify, get, delete and test the detail of IDAP Service
Requirements
The below requirements are needed on the host that executes this module.
Huawei Dorado v5/v6/v7 and OceanStor v5/v6/v7 Storage
Parameters
Parameter |
Comments |
|---|---|
Base DN. |
|
Bind DN. |
|
Bind password. |
|
Parameters used to extend those not currently supported by the module. Configuration needs to be based on the REST API documentation for storage. If necessary, you can contact the plugin technical support for assistance. |
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
Group ID attribute. |
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
The password of the PowerStore host. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Define whether the IDAP Server should exist or not. Choices:
|
|
Port number for the Huawei Enterprise array. If not passed, it will take 8088 as default. Default: |
|
Underlying communication protocol type. Choices:
|
|
Whether to write plugin log to local filesystem. Choices:
|
|
User ID attribute. |
|
User name attribute. |
|
User object type. |
|
User directory. |
|
The username of the PowerStore host. |
|
The path of the SSL certificate variable to specify whether to validate SSL certificate or not. If don’t set means no need to verify ssl cert. |
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
tasks:
- name: Create LDAP Service
register: ldap_info
huawei.enterprise.hw_enterprise_ldap_server:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
bind_password: "{{ bind_password }}"
use_log: "{{ use_log }}"
base_dn: "< base_dn >"
bind_dn: "< bind_dn >"
directory_type: "< ldap | ad >"
transfer_type: "< ldap | ldaps >"
user_id_attr: "< user_id_attr >"
user_name_attr: "< user_name_attr >"
user_object_class: "< user_object_class >"
user_search_path: "< user_search_path >"
group_id_attr: "< group_id_attr >"
state: "present"
- name: Modify LDAP Service
register: ldap_info
huawei.enterprise.hw_enterprise_ldap_server:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
bind_password: "{{ bind_password }}"
base_dn: "< base_dn >"
bind_dn: "< bind_dn >"
directory_type: "< ldap | ad >"
transfer_type: "< ldap | ldaps >"
user_id_attr: "< user_id_attr >"
user_name_attr: "< user_name_attr >"
user_object_class: "< user_object_class >"
user_search_path: "< user_search_path >"
group_id_attr: "< group_id_attr >"
state: "present"
- name: Get LDAP server
register: ldap_info
huawei.enterprise.hw_enterprise_ldap_server:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
state: "present"
filter:
- id
- base_dn
- bind_dn
- directory_type
- transfer_type
- user_id_attr
- user_name_attr
- user_object_class
- user_search_path
- group_name_attr
- group_member_attr
- group_object_class
- group_search_path
- name: Delete LDAP server
huawei.enterprise.hw_enterprise_ldap_server:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
state: "absent"
- name: Test LDAP Service
register: ldap_info
huawei.enterprise.hw_enterprise_ldap_server:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
bind_password: "{{ bind_password }}"
use_log: "{{ use_log }}"
operation: "test"
base_dn: "< base_dn >"
bind_dn: "< bind_dn >"
directory_type: "< ldap | ad >"
transfer_type: "< ldap | ldaps >"
server_ip: "< server_ip >"
port: "< port >"
state: "present"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
playbook action lists Returned: always Sample: |
|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the LDAP Server. Returned: When host exists Sample: |
|
Base DN. Returned: success |
|
Bind DN. Returned: success |
|
LDAP directory type. Returned: success |
|
Group id attribute. Returned: success |
|
Group member attribute. Returned: success |
|
Group name attribute. Returned: success |
|
Group object type. Returned: success |
|
Group directory. Returned: success |
|
Underlying communication protocol type. Returned: success |
|
User ID attribute. Returned: success |
|
User name attribute. Returned: success |
|
User object type. Returned: success |
|
User directory. Returned: success |
|
task execute remark Returned: always Sample: |