fortinet.fortios.fortios_system_admin module – Configure admin users in Fortinet’s FortiOS and FortiGate.
Note
This module is part of the fortinet.fortios collection (version 2.3.9).
You might already have this collection installed if you are using the ansible
package.
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 fortinet.fortios
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: fortinet.fortios.fortios_system_admin
.
New in fortinet.fortios 2.0.0
Synopsis
This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and admin category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
Requirements
The below requirements are needed on the host that executes this module.
ansible>=2.15
Parameters
Parameter |
Comments |
---|---|
Token-based authentication. Generated from GUI of Fortigate. |
|
Enable/Disable logging for task. Choices:
|
|
Member attribute path to operate on. Delimited by a slash character if there are more than one attribute. Parameter marked with member_path is legitimate for doing member operation. |
|
Add or delete a member under specified attribute path. When member_state is specified, the state option is ignored. Choices:
|
|
Indicates whether to create or remove the object. Choices:
|
|
Configure admin users. |
|
Access profile for this administrator. Access profiles control administrator access to FortiGate features. Source system.accprofile.name. |
|
Enable to use the name of an access profile provided by the remote authentication server to control the FortiGate features that this administrator can access. Choices:
|
|
Enable/disable allow admin session to be removed by privileged admin users. Choices:
|
|
Comment. |
|
This administrator”s email address. |
|
Enable/disable force password change on next login. Choices:
|
|
This administrator”s FortiToken serial number. |
|
Enable/disable guest authentication. Choices:
|
|
Guest management portal language. Source system.custom-language.name. |
|
Select guest user groups. |
|
Select guest user groups. |
|
GUI dashboards. |
|
Number of columns. |
|
Dashboard ID. see <a href=’#notes’>Notes</a>. |
|
Layout type. Choices:
|
|
Dashboard name. |
|
Permanent dashboard (can”t be removed via the GUI). Choices:
|
|
Dashboard scope. Choices:
|
|
Virtual domain. Source system.vdom.name. |
|
Dashboard widgets. |
|
Fabric device to monitor. |
|
Fabric device widget name. |
|
Visualization type for fabric device widget. |
|
FortiView device. |
|
FortiView filters. |
|
FortiView Filter ID. see <a href=’#notes’>Notes</a>. |
|
Filter key. |
|
Filter value. |
|
FortiView sort by. |
|
FortiView timeframe. |
|
FortiView type. |
|
FortiView visualization. |
|
Height. |
|
Widget ID. see <a href=’#notes’>Notes</a>. |
|
Security Audit Rating industry. Choices:
|
|
Interface to monitor. Source system.interface.name. |
|
Security Audit Rating region. Choices:
|
|
Widget title. |
|
Widget type. Choices:
|
|
Width. |
|
X position. |
|
Y position. |
|
Favorite GUI menu IDs for the global VDOM. |
|
Select menu ID. |
|
Acknowledgement of new features. |
|
Select menu ID. |
|
Favorite GUI menu IDs for VDOMs. |
|
Select menu ID. |
|
Admin user hidden attribute. |
|
history0 |
|
history1 |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address. |
|
Record user login time. |
|
Last failed login time. |
|
Last successful login time. |
|
User name. |
|
User name. |
|
Admin user password. |
|
Password expire time. |
|
Set to enable peer certificate authentication (for HTTPS admin access). Choices:
|
|
Name of peer group defined under config user group which has PKI members. Used for peer certificate authentication (for HTTPS admin access). |
|
Enable to use the names of VDOMs provided by the remote authentication server to control the VDOMs that this administrator can access. Choices:
|
|
Enable/disable authentication using a remote RADIUS, LDAP, or TACACS+ server. Choices:
|
|
User group name used for remote auth. |
|
Firewall schedule used to restrict when the administrator can log in. No schedule means no restrictions. |
|
Custom SMS server to send SMS messages to. Source system.sms-server.name. |
|
Phone number on which the administrator receives SMS messages. |
|
Send SMS messages using the FortiGuard SMS server or a custom server. Choices:
|
|
Select the certificate to be used by the FortiGate for authentication with an SSH client. Source certificate.remote.name. |
|
Public key of an SSH client. The client is authenticated without being asked for credentials. Create the public-private key pair in the SSH client application. |
|
Public key of an SSH client. The client is authenticated without being asked for credentials. Create the public-private key pair in the SSH client application. |
|
Public key of an SSH client. The client is authenticated without being asked for credentials. Create the public-private key pair in the SSH client application. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address. |
|
Enable/disable two-factor authentication. Choices:
|
|
Authentication method by FortiToken Cloud. Choices:
|
|
Notification method for user activation by FortiToken Cloud. Choices:
|
|
Virtual domain(s) that the administrator can access. |
|
Virtual domain name. Source system.vdom.name. |
|
Enable to use the names of VDOMs provided by the remote authentication server to control the VDOMs that this administrator can access. Choices:
|
|
Enable/disable wildcard RADIUS authentication. Choices:
|
|
Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. Default: |
Notes
Note
Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
The module supports check_mode.
Examples
- name: Configure admin users.
fortinet.fortios.fortios_system_admin:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
system_admin:
accprofile: "<your_own_value> (source system.accprofile.name)"
accprofile_override: "enable"
allow_remove_admin_session: "enable"
comments: "<your_own_value>"
email_to: "<your_own_value>"
force_password_change: "enable"
fortitoken: "<your_own_value>"
guest_auth: "disable"
guest_lang: "<your_own_value> (source system.custom-language.name)"
guest_usergroups:
-
name: "default_name_13"
gui_dashboard:
-
columns: "10"
id: "16"
layout_type: "responsive"
name: "default_name_18"
permanent: "disable"
scope: "global"
vdom: "<your_own_value> (source system.vdom.name)"
widget:
-
fabric_device: "<your_own_value>"
fabric_device_widget_name: "<your_own_value>"
fabric_device_widget_visualization_type: "<your_own_value>"
fortiview_device: "<your_own_value>"
fortiview_filters:
-
id: "28"
key: "<your_own_value>"
value: "<your_own_value>"
fortiview_sort_by: "<your_own_value>"
fortiview_timeframe: "<your_own_value>"
fortiview_type: "<your_own_value>"
fortiview_visualization: "<your_own_value>"
height: "25"
id: "36"
industry: "default"
interface: "<your_own_value> (source system.interface.name)"
region: "default"
title: "<your_own_value>"
type: "sysinfo"
width: "25"
x_pos: "500"
y_pos: "500"
gui_global_menu_favorites:
-
id: "46"
gui_new_feature_acknowledge:
-
id: "48"
gui_vdom_menu_favorites:
-
id: "50"
hidden: "127"
history0: "<your_own_value>"
history1: "<your_own_value>"
ip6_trusthost1: "myhostname"
ip6_trusthost10: "myhostname"
ip6_trusthost2: "myhostname"
ip6_trusthost3: "myhostname"
ip6_trusthost4: "myhostname"
ip6_trusthost5: "myhostname"
ip6_trusthost6: "myhostname"
ip6_trusthost7: "myhostname"
ip6_trusthost8: "myhostname"
ip6_trusthost9: "myhostname"
login_time:
-
last_failed_login: "<your_own_value>"
last_login: "<your_own_value>"
usr_name: "<your_own_value>"
name: "default_name_68"
password: "<your_own_value>"
password_expire: "<your_own_value>"
peer_auth: "enable"
peer_group: "<your_own_value>"
radius_vdom_override: "enable"
remote_auth: "enable"
remote_group: "<your_own_value>"
schedule: "<your_own_value>"
sms_custom_server: "<your_own_value> (source system.sms-server.name)"
sms_phone: "<your_own_value>"
sms_server: "fortiguard"
ssh_certificate: "<your_own_value> (source certificate.remote.name)"
ssh_public_key1: "<your_own_value>"
ssh_public_key2: "<your_own_value>"
ssh_public_key3: "<your_own_value>"
trusthost1: "myhostname"
trusthost10: "myhostname"
trusthost2: "myhostname"
trusthost3: "myhostname"
trusthost4: "myhostname"
trusthost5: "myhostname"
trusthost6: "myhostname"
trusthost7: "myhostname"
trusthost8: "myhostname"
trusthost9: "myhostname"
two_factor: "disable"
two_factor_authentication: "fortitoken"
two_factor_notification: "email"
vdom:
-
name: "default_name_98 (source system.vdom.name)"
vdom_override: "enable"
wildcard: "enable"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Build number of the fortigate image Returned: always Sample: |
|
Last method used to provision the content into FortiGate Returned: always Sample: |
|
Last result given by FortiGate on last operation applied Returned: always Sample: |
|
Master key (id) used in the last call to FortiGate Returned: success Sample: |
|
Name of the table used to fulfill the request Returned: always Sample: |
|
Path of the table used to fulfill the request Returned: always Sample: |
|
Internal revision number Returned: always Sample: |
|
Serial number of the unit Returned: always Sample: |
|
Indication of the operation’s result Returned: always Sample: |
|
Virtual domain used Returned: always Sample: |
|
Version of the FortiGate Returned: always Sample: |