W3cubDocs

/Ansible 2.11

fortinet.fortimanager.fmgr_user_ldap – Configure LDAP server entries.

Note

This plugin is part of the fortinet.fortimanager collection (version 2.0.1).

To install it use: ansible-galaxy collection install fortinet.fortimanager.

To use it in a playbook, specify: fortinet.fortimanager.fmgr_user_ldap.

New in version 2.10: of fortinet.fortimanager

Synopsis

  • This module is able to configure a FortiManager device.
  • Examples include all parameters and values which need to be adjusted to data sources before usage.

Parameters

Parameter Choices/Defaults Comments
adom
string / required
the parameter (adom) in requested url
bypass_validation
boolean
    Choices:
  • no
  • yes
only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters
rc_failed
list / elements=string
the rc codes list with which the conditions to fail will be overriden
rc_succeeded
list / elements=string
the rc codes list with which the conditions to succeed will be overriden
state
string / required
    Choices:
  • present
  • absent
the directive to create, update or delete an object
user_ldap
dictionary
the top level parameters set
account-key-filter
string
Account key filter, using the UPN as the search filter.
account-key-processing
string
    Choices:
  • same
  • strip
Account key processing operation, either keep or strip domain string of UPN in the token.
ca-cert
string
CA certificate name.
cnid
string
Common name identifier for the LDAP server. The common name identifier for most LDAP servers is "cn".
dn
string
Distinguished name used to look up entries on the LDAP server.
dynamic_mapping
list / elements=string
no description
_scope
list / elements=string
no description
name
string
no description
vdom
string
no description
account-key-filter
string
no description
account-key-name
string
no description
account-key-processing
string
    Choices:
  • same
  • strip
no description
ca-cert
string
no description
cnid
string
no description
dn
string
no description
filter
string
no description
group
string
no description
group-filter
string
no description
group-member-check
string
    Choices:
  • user-attr
  • group-object
  • posix-group-object
no description
group-object-filter
string
no description
group-object-search-base
string
no description
group-search-base
string
no description
member-attr
string
no description
obtain-user-info
string
    Choices:
  • disable
  • enable
no description
password
string
no description
password-expiry-warning
string
    Choices:
  • disable
  • enable
no description
password-renewal
string
    Choices:
  • disable
  • enable
no description
port
integer
no description
retrieve-protection-profile
string
no description
search-type
list / elements=string
    Choices:
  • nested
  • recursive
no description
secondary-server
string
no description
secure
string
    Choices:
  • disable
  • starttls
  • ldaps
no description
server
string
no description
server-identity-check
string
    Choices:
  • disable
  • enable
no description
source-ip
string
no description
ssl-min-proto-version
string
    Choices:
  • default
  • TLSv1
  • TLSv1-1
  • TLSv1-2
  • SSLv3
no description
tertiary-server
string
no description
type
string
    Choices:
  • simple
  • anonymous
  • regular
no description
user-info-exchange-server
string
no description
username
string
no description
group-filter
string
Filter used for group matching.
group-member-check
string
    Choices:
  • user-attr
  • group-object
  • posix-group-object
Group member checking methods.
group-object-filter
string
Filter used for group searching.
group-search-base
string
Search base used for group searching.
member-attr
string
Name of attribute from which to get group membership.
name
string
LDAP server entry name.
password
string
no description
password-expiry-warning
string
    Choices:
  • disable
  • enable
Enable/disable password expiry warnings.
password-renewal
string
    Choices:
  • disable
  • enable
Enable/disable online password renewal.
port
integer
Port to be used for communication with the LDAP server (default = 389).
secondary-server
string
Secondary LDAP server CN domain name or IP.
secure
string
    Choices:
  • disable
  • starttls
  • ldaps
Port to be used for authentication.
server
string
LDAP server CN domain name or IP.
server-identity-check
string
    Choices:
  • disable
  • enable
Enable/disable LDAP server identity check (verify server domain name/IP address against the server certificate).
source-ip
string
Source IP for communications to LDAP server.
ssl-min-proto-version
string
    Choices:
  • default
  • TLSv1
  • TLSv1-1
  • TLSv1-2
  • SSLv3
Minimum supported protocol version for SSL/TLS connections (default is to follow system global setting).
tertiary-server
string
Tertiary LDAP server CN domain name or IP.
type
string
    Choices:
  • simple
  • anonymous
  • regular
Authentication type for LDAP searches.
username
string
Username (full DN) for initial binding.
workspace_locking_adom
string
the adom to lock for FortiManager running in workspace mode, the value can be global and others including root
workspace_locking_timeout
integer
Default:
300
the maximum time in seconds to wait for other user to release the workspace lock

Notes

Note

  • Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
  • To create or update an object, use state present directive.
  • To delete an object, use state absent directive.
  • Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded

Examples

- hosts: fortimanager-inventory
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:
   - name: Configure LDAP server entries.
     fmgr_user_ldap:
        bypass_validation: False
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        rc_succeeded: [0, -2, -3, ...]
        rc_failed: [-2, -3, ...]
        adom: <your own value>
        state: <value in [present, absent]>
        user_ldap:
           account-key-filter: <value of string>
           account-key-processing: <value in [same, strip]>
           ca-cert: <value of string>
           cnid: <value of string>
           dn: <value of string>
           dynamic_mapping:
             -
                 _scope:
                   -
                       name: <value of string>
                       vdom: <value of string>
                 account-key-filter: <value of string>
                 account-key-name: <value of string>
                 account-key-processing: <value in [same, strip]>
                 ca-cert: <value of string>
                 cnid: <value of string>
                 dn: <value of string>
                 filter: <value of string>
                 group: <value of string>
                 group-filter: <value of string>
                 group-member-check: <value in [user-attr, group-object, posix-group-object]>
                 group-object-filter: <value of string>
                 group-object-search-base: <value of string>
                 group-search-base: <value of string>
                 member-attr: <value of string>
                 obtain-user-info: <value in [disable, enable]>
                 password: <value of string>
                 password-expiry-warning: <value in [disable, enable]>
                 password-renewal: <value in [disable, enable]>
                 port: <value of integer>
                 retrieve-protection-profile: <value of string>
                 search-type:
                   - nested
                   - recursive
                 secondary-server: <value of string>
                 secure: <value in [disable, starttls, ldaps]>
                 server: <value of string>
                 server-identity-check: <value in [disable, enable]>
                 source-ip: <value of string>
                 ssl-min-proto-version: <value in [default, TLSv1, TLSv1-1, ...]>
                 tertiary-server: <value of string>
                 type: <value in [simple, anonymous, regular]>
                 user-info-exchange-server: <value of string>
                 username: <value of string>
           group-filter: <value of string>
           group-member-check: <value in [user-attr, group-object, posix-group-object]>
           group-object-filter: <value of string>
           group-search-base: <value of string>
           member-attr: <value of string>
           name: <value of string>
           password: <value of string>
           password-expiry-warning: <value in [disable, enable]>
           password-renewal: <value in [disable, enable]>
           port: <value of integer>
           secondary-server: <value of string>
           secure: <value in [disable, starttls, ldaps]>
           server: <value of string>
           server-identity-check: <value in [disable, enable]>
           source-ip: <value of string>
           ssl-min-proto-version: <value in [default, TLSv1, TLSv1-1, ...]>
           tertiary-server: <value of string>
           type: <value in [simple, anonymous, regular]>
           username: <value of string>

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
request_url
string
always
The full url requested

Sample:
/sys/login/user
response_code
integer
always
The status of api request

response_message
string
always
The descriptive message of the api response

Sample:
OK.


Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Frank Shen (@fshen01)
  • Hongbin Lu (@fgtdev-hblu)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/fortinet/fortimanager/fmgr_user_ldap_module.html