fortinet.fortimanager.fmgr_user_group_dynamicmapping (2.4.0) — module

Configure user groups.

| "added in version" 2.1.0 of fortinet.fortimanager"

Authors: Xinwei Du (@dux-fortinet), Xing Li (@lix-fortinet), Jie Xue (@JieX19), Link Zheng (@chillancezen), Frank Shen (@fshen01), Hongbin Lu (@fgtdev-hblu)

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortimanager:==2.4.0


Add to requirements.yml

  collections:
    - name: fortinet.fortimanager
      version: 2.4.0

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure user groups.
      fortinet.fortimanager.fmgr_user_group_dynamicmapping:
        # 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>
        group: <your own value>
        state: present # <value in [present, absent]>
        user_group_dynamicmapping:
          _scope:
            -
              name: <string>
              vdom: <string>
          auth_concurrent_override: <value in [disable, enable]>
          auth_concurrent_value: <integer>
          authtimeout: <integer>
          company: <value in [optional, mandatory, disabled]>
          email: <value in [disable, enable]>
          expire: <integer>
          expire_type: <value in [immediately, first-successful-login]>
          group_type: <value in [firewall, directory-service, fsso-service, ...]>
          guest:
            -
              comment: <string>
              company: <string>
              email: <string>
              expiration: <string>
              group: <string>
              id: <integer>
              mobile_phone: <string>
              name: <string>
              password: <list or string>
              sponsor: <string>
              user_id: <string>
          http_digest_realm: <string>
          id: <integer>
          ldap_memberof: <string>
          logic_type: <value in [or, and]>
          match:
            -
              _gui_meta: <string>
              group_name: <string>
              id: <integer>
              server_name: <string>
          max_accounts: <integer>
          member: <list or string>
          mobile_phone: <value in [disable, enable]>
          multiple_guest_add: <value in [disable, enable]>
          password: <value in [auto-generate, specify, disable]>
          redir_url: <string>
          sms_custom_server: <string>
          sms_server: <value in [fortiguard, custom]>
          sponsor: <value in [optional, mandatory, disabled]>
          sslvpn_bookmarks_group: <list or string>
          sslvpn_cache_cleaner: <value in [disable, enable]>
          sslvpn_client_check:
            - forticlient
            - forticlient-av
            - forticlient-fw
            - 3rdAV
            - 3rdFW
          sslvpn_ftp: <value in [disable, enable]>
          sslvpn_http: <value in [disable, enable]>
          sslvpn_os_check: <value in [disable, enable]>
          sslvpn_os_check_list:
            action: <value in [allow, check-up-to-date, deny]>
            latest_patch_level: <string>
            name: <string>
            tolerance: <integer>
          sslvpn_portal: <list or string>
          sslvpn_portal_heading: <string>
          sslvpn_rdp: <value in [disable, enable]>
          sslvpn_samba: <value in [disable, enable]>
          sslvpn_split_tunneling: <value in [disable, enable]>
          sslvpn_ssh: <value in [disable, enable]>
          sslvpn_telnet: <value in [disable, enable]>
          sslvpn_tunnel: <value in [disable, enable]>
          sslvpn_tunnel_endip: <string>
          sslvpn_tunnel_ip_mode: <value in [range, usrgrp]>
          sslvpn_tunnel_startip: <string>
          sslvpn_virtual_desktop: <value in [disable, enable]>
          sslvpn_vnc: <value in [disable, enable]>
          sslvpn_webapp: <value in [disable, enable]>
          sso_attribute_value: <string>
          user_id: <value in [email, auto-generate, specify]>
          user_name: <value in [disable, enable]>

Inputs

    
adom:
    description: The parameter (adom) in requested url.
    required: true
    type: str

group:
    description: The parameter (group) in requested url.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    description: The directive to create, update or delete an object.
    required: true
    type: str

rc_failed:
    description: The rc codes list with which the conditions to fail will be overriden.
    elements: int
    type: list

enable_log:
    default: false
    description: Enable/Disable logging for task.
    type: bool

access_token:
    description: The token to access FortiManager without using username and password.
    type: str

rc_succeeded:
    description: The rc codes list with which the conditions to succeed will be overriden.
    elements: int
    type: list

proposed_method:
    choices:
    - update
    - set
    - add
    description: The overridden method for the underlying Json RPC request.
    type: str

bypass_validation:
    default: false
    description: Only set to True when module schema diffs with FortiManager API structure,
      module continues to execute without validating parameters.
    type: bool

workspace_locking_adom:
    description: The adom to lock for FortiManager running in workspace mode, the value
      can be global and others including root.
    type: str

forticloud_access_token:
    description: Authenticate Ansible client with forticloud API access token.
    type: str

user_group_dynamicmapping:
    description: The top level parameters set.
    required: false
    suboptions:
      _scope:
        description: No description.
        elements: dict
        suboptions:
          name:
            description: No description.
            type: str
          vdom:
            description: No description.
            type: str
        type: list
      auth-concurrent-override:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to auth_concurrent_override. Enable/disable
          overriding the global number of concurrent authen...
        type: str
      auth-concurrent-value:
        description: Deprecated, please rename it to auth_concurrent_value. Maximum number
          of concurrent authenticated connections per user
        type: int
      authtimeout:
        description: Authentication timeout in minutes for this user group.
        type: int
      company:
        choices:
        - optional
        - mandatory
        - disabled
        description: Set the action for the company guest user field.
        type: str
      email:
        choices:
        - disable
        - enable
        description: Enable/disable the guest user email address field.
        type: str
      expire:
        description: Time in seconds before guest user accounts expire
        type: int
      expire-type:
        choices:
        - immediately
        - first-successful-login
        description: Deprecated, please rename it to expire_type. Determine when the expiration
          countdown begins.
        type: str
      group-type:
        choices:
        - firewall
        - directory-service
        - fsso-service
        - guest
        - rsso
        description: Deprecated, please rename it to group_type. Set the group to be for
          firewall authentication, FSSO, RSSO, or guest users.
        type: str
      guest:
        description: No description.
        elements: dict
        suboptions:
          comment:
            description: Comment.
            type: str
          company:
            description: Set the action for the company guest user field.
            type: str
          email:
            description: Email.
            type: str
          expiration:
            description: Expire time.
            type: str
          group:
            description: No description.
            type: str
          id:
            description: Guest ID.
            type: int
          mobile-phone:
            description: Deprecated, please rename it to mobile_phone. Mobile phone.
            type: str
          name:
            description: Guest name.
            type: str
          password:
            description: (list) No description.
            type: raw
          sponsor:
            description: Set the action for the sponsor guest user field.
            type: str
          user-id:
            description: Deprecated, please rename it to user_id. Guest ID.
            type: str
        type: list
      http-digest-realm:
        description: Deprecated, please rename it to http_digest_realm. Realm attribute
          for MD5-digest authentication.
        type: str
      id:
        description: Group ID.
        required: true
        type: int
      ldap-memberof:
        description: Deprecated, please rename it to ldap_memberof.
        type: str
      logic-type:
        choices:
        - or
        - and
        description: Deprecated, please rename it to logic_type.
        type: str
      match:
        description: No description.
        elements: dict
        suboptions:
          _gui_meta:
            description: No description.
            type: str
          group-name:
            description: Deprecated, please rename it to group_name. Name of matching
              user or group on remote authentication server.
            type: str
          id:
            description: ID.
            type: int
          server-name:
            description: Deprecated, please rename it to server_name. Name of remote auth
              server.
            type: str
        type: list
      max-accounts:
        description: Deprecated, please rename it to max_accounts. Maximum number of guest
          accounts that can be created for this group
        type: int
      member:
        description: (list or str) No description.
        type: raw
      mobile-phone:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to mobile_phone. Enable/disable the
          guest user mobile phone number field.
        type: str
      multiple-guest-add:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to multiple_guest_add. Enable/disable
          addition of multiple guests.
        type: str
      password:
        choices:
        - auto-generate
        - specify
        - disable
        description: Guest user password type.
        type: str
      redir-url:
        description: Deprecated, please rename it to redir_url.
        type: str
      sms-custom-server:
        description: Deprecated, please rename it to sms_custom_server. SMS server.
        type: str
      sms-server:
        choices:
        - fortiguard
        - custom
        description: Deprecated, please rename it to sms_server. Send SMS through FortiGuard
          or other external server.
        type: str
      sponsor:
        choices:
        - optional
        - mandatory
        - disabled
        description: Set the action for the sponsor guest user field.
        type: str
      sslvpn-bookmarks-group:
        description: (list or str) Deprecated, please rename it to sslvpn_bookmarks_group.
        type: raw
      sslvpn-cache-cleaner:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_cache_cleaner.
        type: str
      sslvpn-client-check:
        choices:
        - forticlient
        - forticlient-av
        - forticlient-fw
        - 3rdAV
        - 3rdFW
        description: Deprecated, please rename it to sslvpn_client_check.
        elements: str
        type: list
      sslvpn-ftp:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_ftp.
        type: str
      sslvpn-http:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_http.
        type: str
      sslvpn-os-check:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_os_check.
        type: str
      sslvpn-os-check-list:
        description: Deprecated, please rename it to sslvpn_os_check_list.
        suboptions:
          action:
            choices:
            - allow
            - check-up-to-date
            - deny
            description: No description.
            type: str
          latest-patch-level:
            description: Deprecated, please rename it to latest_patch_level.
            type: str
          name:
            description: No description.
            type: str
          tolerance:
            description: No description.
            type: int
        type: dict
      sslvpn-portal:
        description: (list or str) Deprecated, please rename it to sslvpn_portal.
        type: raw
      sslvpn-portal-heading:
        description: Deprecated, please rename it to sslvpn_portal_heading.
        type: str
      sslvpn-rdp:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_rdp.
        type: str
      sslvpn-samba:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_samba.
        type: str
      sslvpn-split-tunneling:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_split_tunneling.
        type: str
      sslvpn-ssh:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_ssh.
        type: str
      sslvpn-telnet:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_telnet.
        type: str
      sslvpn-tunnel:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_tunnel.
        type: str
      sslvpn-tunnel-endip:
        description: Deprecated, please rename it to sslvpn_tunnel_endip.
        type: str
      sslvpn-tunnel-ip-mode:
        choices:
        - range
        - usrgrp
        description: Deprecated, please rename it to sslvpn_tunnel_ip_mode.
        type: str
      sslvpn-tunnel-startip:
        description: Deprecated, please rename it to sslvpn_tunnel_startip.
        type: str
      sslvpn-virtual-desktop:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_virtual_desktop.
        type: str
      sslvpn-vnc:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_vnc.
        type: str
      sslvpn-webapp:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to sslvpn_webapp.
        type: str
      sso-attribute-value:
        description: Deprecated, please rename it to sso_attribute_value. Name of the
          RADIUS user group that this local user group represents.
        type: str
      user-id:
        choices:
        - email
        - auto-generate
        - specify
        description: Deprecated, please rename it to user_id. Guest user ID type.
        type: str
      user-name:
        choices:
        - disable
        - enable
        description: Deprecated, please rename it to user_name. Enable/disable the guest
          user name entry.
        type: str
    type: dict

workspace_locking_timeout:
    default: 300
    description: The maximum time in seconds to wait for other user to release the workspace
      lock.
    type: int

Outputs

meta:
  contains:
    request_url:
      description: The full url requested.
      returned: always
      sample: /sys/login/user
      type: str
    response_code:
      description: The status of api request.
      returned: always
      sample: 0
      type: int
    response_data:
      description: The api response.
      returned: always
      type: list
    response_message:
      description: The descriptive message of the api response.
      returned: always
      sample: OK.
      type: str
    system_information:
      description: The information of the target system.
      returned: always
      type: dict
  description: The result of the request.
  returned: always
  type: dict
rc:
  description: The status the request.
  returned: always
  sample: 0
  type: int
version_check_warning:
  description: Warning if the parameters used in the playbook are not supported by
    the current FortiManager version.
  returned: complex
  type: list