fmgr_user_group – Configure user groups.¶
New in version 2.10.
Synopsis¶
- This module is able to configure a FortiManager device.
- Examples include all parameters and values need to be adjusted to data sources before usage.
- Tested with FortiManager v6.0.0.
Requirements¶
The below requirements are needed on the host that executes this module.
- ansible>=2.9.0
Parameters¶
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters type: bool required: false default: False
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- adom - The parameter in requested url type: str required: true
- user_group - Configure user groups. type: dict
- auth-concurrent-override - Enable/disable overriding the global number of concurrent authentication sessions for this user group. type: str choices: [disable, enable]
- auth-concurrent-value - Maximum number of concurrent authenticated connections per user (0 - 100). type: int
- authtimeout - Authentication timeout in minutes for this user group. type: int
- company - Set the action for the company guest user field. type: str choices: [optional, mandatory, disabled]
- email - Enable/disable the guest user email address field. type: str choices: [disable, enable]
- expire - Time in seconds before guest user accounts expire. type: int
- expire-type - Determine when the expiration countdown begins. type: str choices: [immediately, first-successful-login]
- group-type - Set the group to be for firewall authentication, FSSO, RSSO, or guest users. type: str choices: [firewall, directory-service, fsso-service, guest, rsso]
- guest - No description for the parameter type: array
- comment - Comment. type: str
- company - Set the action for the company guest user field. type: str
- email - Email. type: str
- expiration - Expire time. type: str
- mobile-phone - Mobile phone. type: str
- name - Guest name. type: str
- password - No description for the parameter type: str
- sponsor - Set the action for the sponsor guest user field. type: str
- user-id - Guest ID. type: str
- http-digest-realm - Realm attribute for MD5-digest authentication. type: str
- id - Group ID. type: int
- match - No description for the parameter type: array
- _gui_meta - No description for the parameter type: str
- group-name - Name of matching group on remote authentication server. type: str
- id - ID. type: int
- server-name - Name of remote auth server. type: str
- max-accounts - Maximum number of guest accounts that can be created for this group (0 means unlimited). type: int
- member - Names of users, peers, LDAP severs, or RADIUS servers to add to the user group. type: str
- mobile-phone - Enable/disable the guest user mobile phone number field. type: str choices: [disable, enable]
- multiple-guest-add - Enable/disable addition of multiple guests. type: str choices: [disable, enable]
- name - Group name. type: str
- password - Guest user password type. type: str choices: [auto-generate, specify, disable]
- sms-custom-server - SMS server. type: str
- sms-server - Send SMS through FortiGuard or other external server. type: str choices: [fortiguard, custom]
- sponsor - Set the action for the sponsor guest user field. type: str choices: [optional, mandatory, disabled]
- sso-attribute-value - Name of the RADIUS user group that this local user group represents. type: str
- user-id - Guest user ID type. type: str choices: [email, auto-generate, specify]
- user-name - Enable/disable the guest user name entry. type: str choices: [disable, enable]
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 user groups.
fmgr_user_group:
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_group:
auth-concurrent-override: <value in [disable, enable]>
auth-concurrent-value: <value of integer>
authtimeout: <value of integer>
company: <value in [optional, mandatory, disabled]>
email: <value in [disable, enable]>
expire: <value of integer>
expire-type: <value in [immediately, first-successful-login]>
group-type: <value in [firewall, directory-service, fsso-service, ...]>
guest:
-
comment: <value of string>
company: <value of string>
email: <value of string>
expiration: <value of string>
mobile-phone: <value of string>
name: <value of string>
password: <value of string>
sponsor: <value of string>
user-id: <value of string>
http-digest-realm: <value of string>
id: <value of integer>
match:
-
_gui_meta: <value of string>
group-name: <value of string>
id: <value of integer>
server-name: <value of string>
max-accounts: <value of integer>
member: <value of string>
mobile-phone: <value in [disable, enable]>
multiple-guest-add: <value in [disable, enable]>
name: <value of string>
password: <value in [auto-generate, specify, disable]>
sms-custom-server: <value of string>
sms-server: <value in [fortiguard, custom]>
sponsor: <value in [optional, mandatory, disabled]>
sso-attribute-value: <value of string>
user-id: <value in [email, auto-generate, specify]>
user-name: <value in [disable, enable]>
Return Values¶
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
- request_url - The full url requested returned: always type: str sample: /sys/login/user
- response_code - The status of api request returned: always type: int sample: 0
- response_message - The descriptive message of the api response returned: always type: str sample: OK
- response_data - The data body of the api response returned: optional type: list or dict