fortios_system_accprofile – Configure access profiles for system administrators in Fortinet’s FortiOS and FortiGate.

New in version 2.8.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and accprofile 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.9.0

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: False
  • vdom - 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. type: str default: root
  • state - Indicates whether to create or remove the object. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. type: str required: False choices: present, absent
  • system_accprofile - Configure access profiles for system administrators. type: dict
    • state - B(Deprecated) type: str required: False choices: present, absent
    • admintimeout - Administrator timeout for this access profile (0 - 480 min). type: int
    • admintimeout_override - Enable/disable overriding the global administrator idle timeout. type: str choices: enable, disable
    • authgrp - Administrator access to Users and Devices. type: str choices: none, read, read-write
    • comments - Comment. type: str
    • ftviewgrp - FortiView. type: str choices: none, read, read-write
    • fwgrp - Administrator access to the Firewall configuration. type: str choices: none, read, read-write, custom
    • fwgrp_permission - Custom firewall permission. type: dict
      • address - Address Configuration. type: str choices: none, read, read-write
      • policy - Policy Configuration. type: str choices: none, read, read-write
      • schedule - Schedule Configuration. type: str choices: none, read, read-write
      • service - Service Configuration. type: str choices: none, read, read-write
    • loggrp - Administrator access to Logging and Reporting including viewing log messages. type: str choices: none, read, read-write, custom
    • loggrp_permission - Custom Log & Report permission. type: dict
      • config - Log & Report configuration. type: str choices: none, read, read-write
      • data_access - Log & Report Data Access. type: str choices: none, read, read-write
      • report_access - Log & Report Report Access. type: str choices: none, read, read-write
      • threat_weight - Log & Report Threat Weight. type: str choices: none, read, read-write
    • name - Profile name. type: str required: True
    • netgrp - Network Configuration. type: str choices: none, read, read-write, custom
    • netgrp_permission - Custom network permission. type: dict
      • cfg - Network Configuration. type: str choices: none, read, read-write
      • packet_capture - Packet Capture Configuration. type: str choices: none, read, read-write
      • route_cfg - Router Configuration. type: str choices: none, read, read-write
    • scope - Scope of admin access: global or specific VDOM(s). type: str choices: vdom, global
    • secfabgrp - Security Fabric. type: str choices: none, read, read-write
    • sysgrp - System Configuration. type: str choices: none, read, read-write, custom
    • sysgrp_permission - Custom system permission. type: dict
      • admin - Administrator Users. type: str choices: none, read, read-write
      • cfg - System Configuration. type: str choices: none, read, read-write
      • mnt - Maintenance. type: str choices: none, read, read-write
      • upd - FortiGuard Updates. type: str choices: none, read, read-write
    • utmgrp - Administrator access to Security Profiles. type: str choices: none, read, read-write, custom
    • utmgrp_permission - Custom Security Profile permissions. type: dict
      • antivirus - Antivirus profiles and settings. type: str choices: none, read, read-write
      • application_control - Application Control profiles and settings. type: str choices: none, read, read-write
      • data_loss_prevention - DLP profiles and settings. type: str choices: none, read, read-write
      • dnsfilter - DNS Filter profiles and settings. type: str choices: none, read, read-write
      • endpoint_control - FortiClient Profiles. type: str choices: none, read, read-write
      • icap - ICAP profiles and settings. type: str choices: none, read, read-write
      • ips - IPS profiles and settings. type: str choices: none, read, read-write
      • spamfilter - AntiSpam filter and settings. type: str choices: none, read, read-write
      • voip - VoIP profiles and settings. type: str choices: none, read, read-write
      • waf - Web Application Firewall profiles and settings. type: str choices: none, read, read-write
      • webfilter - Web Filter profiles and settings. type: str choices: none, read, read-write
    • vpngrp - Administrator access to IPsec, SSL, PPTP, and L2TP VPN. type: str choices: none, read, read-write
    • wanoptgrp - Administrator access to WAN Opt & Cache. type: str choices: none, read, read-write
    • wifi - Administrator access to the WiFi controller and Switch controller. type: str choices: none, read, read-write

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure access profiles for system administrators.
    fortios_system_accprofile:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      system_accprofile:
        admintimeout: "3"
        admintimeout_override: "enable"
        authgrp: "none"
        comments: "<your_own_value>"
        ftviewgrp: "none"
        fwgrp: "none"
        fwgrp_permission:
            address: "none"
            policy: "none"
            schedule: "none"
            service: "none"
        loggrp: "none"
        loggrp_permission:
            config: "none"
            data_access: "none"
            report_access: "none"
            threat_weight: "none"
        name: "default_name_20"
        netgrp: "none"
        netgrp_permission:
            cfg: "none"
            packet_capture: "none"
            route_cfg: "none"
        scope: "vdom"
        secfabgrp: "none"
        sysgrp: "none"
        sysgrp_permission:
            admin: "none"
            cfg: "none"
            mnt: "none"
            upd: "none"
        utmgrp: "none"
        utmgrp_permission:
            antivirus: "none"
            application_control: "none"
            data_loss_prevention: "none"
            dnsfilter: "none"
            endpoint_control: "none"
            icap: "none"
            ips: "none"
            spamfilter: "none"
            voip: "none"
            waf: "none"
            webfilter: "none"
        vpngrp: "none"
        wanoptgrp: "none"
        wifi: "none"

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:

  • build - Build number of the fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • revision - Internal revision number returned: always type: str sample: 17.0.2.10658
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.