:source: fmgd_system_accprofile.py
:orphan:
.. _fmgd_system_accprofile:
fmgd_system_accprofile -- Configure access profiles for system administrators.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
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 v7.x.
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible-core>=2.16.0
FortiManager Version Compatibility
----------------------------------
.. raw:: html
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Parameters
----------
.. raw:: html
- access_token -The token to access FortiManager without using username and password. type: str required: false
- 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
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
- 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
- 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
- device - The parameter in requested url type: str required: true
- system_accprofile - Configure access profiles for system administrators. type: dict
- admintimeout Administrator timeout for this access profile (0 - 480 min, default = 10, 0 means never timeout). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- admintimeout_override (Alias name: admintimeout-override) Enable/disable overriding the global administrator idle timeout. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- authgrp Administrator access to users and devices. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cli_config (Alias name: cli-config) Enable/disable permission to run config commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.4.3 -> latest
- cli_diagnose (Alias name: cli-diagnose) Enable/disable permission to run diagnostic commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.4.3 -> latest
- cli_exec (Alias name: cli-exec) Enable/disable permission to run execute commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.4.3 -> latest
- cli_get (Alias name: cli-get) Enable/disable permission to run get commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.4.3 -> latest
- cli_show (Alias name: cli-show) Enable/disable permission to run show commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.4.3 -> latest
- comments Comment. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ftviewgrp Fortiview. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- fwgrp Administrator access to the firewall configuration. type: str choices: [none, read, read-write, custom]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- fwgrp_permission (Alias name: fwgrp-permission) Fwgrp permission. type: dict
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- address Address configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- others Other firewall configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- policy Policy configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- schedule Schedule configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- service Service configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- packet_capture (Alias name: packet-capture) Packet capture configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- loggrp Administrator access to logging and reporting including viewing log messages. type: str choices: [none, read, read-write, custom]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- loggrp_permission (Alias name: loggrp-permission) Loggrp permission. type: dict
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- config Log & report configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- data_access (Alias name: data-access) Log & report data access. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- report_access (Alias name: report-access) Log & report report access. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- threat_weight (Alias name: threat-weight) Log & report threat weight. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- name Profile name. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- netgrp Network configuration. type: str choices: [none, read, read-write, custom]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- netgrp_permission (Alias name: netgrp-permission) Netgrp permission. type: dict
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cfg Network configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- packet_capture (Alias name: packet-capture) Packet capture configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- route_cfg (Alias name: route-cfg) Router configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- scope Scope of admin access: global or specific vdom(s). type: str choices: [vdom, global]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- secfabgrp Security fabric. type: str choices: [none, read, read-write, custom]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- sysgrp System configuration. type: str choices: [none, read, read-write, custom]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- sysgrp_permission (Alias name: sysgrp-permission) Sysgrp permission. type: dict
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- admin Administrator users. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cfg System configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- mnt Maintenance. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- upd Fortiguard updates. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- system_diagnostics (Alias name: system-diagnostics) Enable/disable permission to run system diagnostic commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- system_execute_ssh (Alias name: system-execute-ssh) Enable/disable permission to execute ssh commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- system_execute_telnet (Alias name: system-execute-telnet) Enable/disable permission to execute telnet commands. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- utmgrp Administrator access to security profiles. type: str choices: [none, read, read-write, custom]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- utmgrp_permission (Alias name: utmgrp-permission) Utmgrp permission. type: dict
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- antivirus Antivirus profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- application_control (Alias name: application-control) Application control profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- casb Inline casb filter profile and settings type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.3 -> latest
- data_leak_prevention (Alias name: data-leak-prevention) Dlp profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dlp Dlp profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.3 -> latest
- dnsfilter Dns filter profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- emailfilter Email filter and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- endpoint_control (Alias name: endpoint-control) Forticlient profiles. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- file_filter (Alias name: file-filter) File-filter profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- icap Icap profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ips Ips profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- mmsgtp Utm permission. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- videofilter Video filter profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- virtual_patch (Alias name: virtual-patch) Virtual patch profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.3 -> latest
- voip Voip profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- waf Web application firewall profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- webfilter Web filter profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- data_loss_prevention (Alias name: data-loss-prevention) Dlp profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- spamfilter Antispam filter and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- telemetry Telemetry profile and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.6.4 -> latest
- vpngrp Administrator access to ipsec, ssl, pptp, and l2tp vpn. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- wanoptgrp Administrator access to wan opt & cache. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- wifi Administrator access to the wifi controller and switch controller. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- admingrp Administrator access to add, remove, and edit admin accounts and access profiles. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- certgrp Administrator access to the certificate configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- routegrp Administrator access to the routing configuration. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- mntgrp Administrator access to maintenance commands including reset to factory defaults, format log disk, reboot, restore, and shutdown. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- updategrp Administrator access to the fortiguard configuration and requesting fortiguard updates. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.4.8 -> v7.4.10
- secfabgrp_permission (Alias name: secfabgrp-permission) Secfabgrp permission. type: dict
more...
Supported Version Ranges: v7.6.5 -> latest
- csffoo Fabric overlay orchestrator profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.6.5 -> latest
- csfsys Security fabric system profiles and settings. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.6.5 -> latest
- mmsgtp Utm permission. type: str choices: [none, read, read-write]
more...
Supported Version Ranges: v7.6.5 -> latest
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
--------
.. code-block:: yaml+jinja
- name: Example playbook (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
gather_facts: false
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Configure access profiles for system administrators.
fortinet.fmgdevice.fmgd_system_accprofile:
# bypass_validation: false
# workspace_locking_adom:
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device:
state: present #
system_accprofile:
name: "your value" # Required variable, string
# admintimeout:
# admintimeout_override:
# authgrp:
# cli_config:
# cli_diagnose:
# cli_exec:
# cli_get:
# cli_show:
# comments:
# ftviewgrp:
# fwgrp:
# fwgrp_permission:
# address:
# others:
# policy:
# schedule:
# service:
# packet_capture:
# loggrp:
# loggrp_permission:
# config:
# data_access:
# report_access:
# threat_weight:
# netgrp:
# netgrp_permission:
# cfg:
# packet_capture:
# route_cfg:
# scope:
# secfabgrp:
# sysgrp:
# sysgrp_permission:
# admin:
# cfg:
# mnt:
# upd:
# system_diagnostics:
# system_execute_ssh:
# system_execute_telnet:
# utmgrp:
# utmgrp_permission:
# antivirus:
# application_control:
# casb:
# data_leak_prevention:
# dlp:
# dnsfilter:
# emailfilter:
# endpoint_control:
# file_filter:
# icap:
# ips:
# mmsgtp:
# videofilter:
# virtual_patch:
# voip:
# waf:
# webfilter:
# data_loss_prevention:
# spamfilter:
# telemetry:
# vpngrp:
# wanoptgrp:
# wifi:
# admingrp:
# certgrp:
# routegrp:
# mntgrp:
# updategrp:
# secfabgrp_permission:
# csffoo:
# csfsys:
# mmsgtp:
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:
.. raw:: html
- meta - The result of the request.returned: always type: dict
- 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_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Xinwei Du (@dux-fortinet)
- Xing Li (@lix-fortinet)
- Jie Xue (@JieX19)
- Link Zheng (@chillancezen)
- Frank Shen (@fshen01)
- Hongbin Lu (@fgtdev-hblu)