auth_ldap_servers - LDAP Resource

Added in version 1.0.0.

Synopsis

LDAP Resource.

Use API “/resource-api/v2/auth/ldap-servers”.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.17.0

Parameters

  • state The state of the module. "present" means create or update the resource, "absent" means delete the resource.type: strchoices: ['present', 'absent']default: present
  • force_behavior Specify this option to force the method to use to interact with the resource.type: strchoices: ['none', 'read', 'create', 'update', 'delete']default: none
  • bypass_validation Bypass validation of the module.type: booldefault: False
  • params The parameters of the module.[Required]type: dict
    • primary_key [Required]type: str
    • server type: str
    • port type: int
    • cnid type: str
    • dn type: str
    • bind_type type: strchoices: ['anonymous', 'regular', 'simple']
    • secure_connection type: bool
    • advanced_group_matching_enabled type: bool
    • group_member_check type: strchoices: ['group-object', 'posix-group-object', 'user-attr']
    • member_attribute type: str
    • group_filter type: str
    • group_search_base type: str
    • group_object_filter type: str
    • server_identity_check_enabled type: bool
    • password_renewal_enabled type: bool
    • certificate type: dict
      • primary_key type: str
      • datasource type: str
    • client_cert_auth_enabled type: bool
    • client_cert type: dict
      • primary_key type: str
      • datasource type: str
    • username type: str
    • password type: str

Examples

- name: Auth LDAP Server
  hosts: fortisase
  gather_facts: false
  vars:
    primary_key: "ldap_server_example"
  tasks:
    - name: Create/Update Auth LDAP Server
      fortinet.fortisase.auth_ldap_servers:
        state: present
        params:
          primary_key: "{{ primary_key }}"
          server: "1.1.1.1"
          port: 1111
          cnid: "test"
          dn: "cn=admin,dc=example,dc=com"
          client_cert_auth_enabled: false
          bind_type: "simple"
          secure_connection: false
          server_identity_check_enabled: true
          advanced_group_matching_enabled: true
          group_member_check: "user-attr"
          group_filter: "cn=group,dc=example,dc=com"
          group_search_base: "dc=example,dc=com"
          certificate:
            primary_key: "certificate"
            datasource: "system/certificate/ca-certificates"
    - name: Delete Auth LDAP Server
      fortinet.fortisase.auth_ldap_servers:
        state: absent
        params:
          primary_key: "{{ primary_key }}"

Return Values

  • http_code type: intreturned: always
  • response type: rawreturned: always

Authors

  • Xinwei Du (@dux-fortinet)