fortinet.fortios.fortios_system_accprofile (2.3.6) — module

Configure access profiles for system administrators in Fortinet's FortiOS and FortiGate.

| "added in version" 2.0.0 of fortinet.fortios"

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

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortios:==2.3.6


Add to requirements.yml

  collections:
    - name: fortinet.fortios
      version: 2.3.6

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure access profiles for system administrators.
  fortinet.fortios.fortios_system_accprofile:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      system_accprofile:
          admintimeout: "10"
          admintimeout_override: "enable"
          authgrp: "none"
          cli_config: "enable"
          cli_diagnose: "enable"
          cli_exec: "enable"
          cli_get: "enable"
          cli_show: "enable"
          comments: "<your_own_value>"
          ftviewgrp: "none"
          fwgrp: "none"
          fwgrp_permission:
              address: "none"
              others: "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_26"
          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"
          system_diagnostics: "enable"
          system_execute_ssh: "enable"
          system_execute_telnet: "enable"
          utmgrp: "none"
          utmgrp_permission:
              antivirus: "none"
              application_control: "none"
              casb: "none"
              data_leak_prevention: "none"
              data_loss_prevention: "none"
              dnsfilter: "none"
              emailfilter: "none"
              endpoint_control: "none"
              file_filter: "none"
              icap: "none"
              ips: "none"
              mmsgtp: "none"
              spamfilter: "none"
              videofilter: "none"
              virtual_patch: "none"
              voip: "none"
              waf: "none"
              webfilter: "none"
          vpngrp: "none"
          wanoptgrp: "none"
          wifi: "none"

Inputs

    
vdom:
    default: root
    description:
    - 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

state:
    choices:
    - present
    - absent
    description:
    - Indicates whether to create or remove the object.
    required: true
    type: str

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

member_path:
    description:
    - 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.
    type: str

access_token:
    description:
    - Token-based authentication. Generated from GUI of Fortigate.
    required: false
    type: str

member_state:
    choices:
    - present
    - absent
    description:
    - Add or delete a member under specified attribute path.
    - When member_state is specified, the state option is ignored.
    type: str

system_accprofile:
    default: null
    description:
    - Configure access profiles for system administrators.
    suboptions:
      admintimeout:
        description:
        - Administrator timeout for this access profile (0 - 480 min).
        type: int
      admintimeout_override:
        choices:
        - enable
        - disable
        description:
        - Enable/disable overriding the global administrator idle timeout.
        type: str
      authgrp:
        choices:
        - none
        - read
        - read-write
        description:
        - Administrator access to Users and Devices.
        type: str
      cli_config:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to run config commands.
        type: str
      cli_diagnose:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to run diagnostic commands.
        type: str
      cli_exec:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to run execute commands.
        type: str
      cli_get:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to run get commands.
        type: str
      cli_show:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to run show commands.
        type: str
      comments:
        description:
        - Comment.
        type: str
      ftviewgrp:
        choices:
        - none
        - read
        - read-write
        description:
        - FortiView.
        type: str
      fwgrp:
        choices:
        - none
        - read
        - read-write
        - custom
        description:
        - Administrator access to the Firewall configuration.
        type: str
      fwgrp_permission:
        description:
        - Custom firewall permission.
        suboptions:
          address:
            choices:
            - none
            - read
            - read-write
            description:
            - Address Configuration.
            type: str
          others:
            choices:
            - none
            - read
            - read-write
            description:
            - Other Firewall Configuration.
            type: str
          policy:
            choices:
            - none
            - read
            - read-write
            description:
            - Policy Configuration.
            type: str
          schedule:
            choices:
            - none
            - read
            - read-write
            description:
            - Schedule Configuration.
            type: str
          service:
            choices:
            - none
            - read
            - read-write
            description:
            - Service Configuration.
            type: str
        type: dict
      loggrp:
        choices:
        - none
        - read
        - read-write
        - custom
        description:
        - Administrator access to Logging and Reporting including viewing log messages.
        type: str
      loggrp_permission:
        description:
        - Custom Log & Report permission.
        suboptions:
          config:
            choices:
            - none
            - read
            - read-write
            description:
            - Log & Report configuration.
            type: str
          data_access:
            choices:
            - none
            - read
            - read-write
            description:
            - Log & Report Data Access.
            type: str
          report_access:
            choices:
            - none
            - read
            - read-write
            description:
            - Log & Report Report Access.
            type: str
          threat_weight:
            choices:
            - none
            - read
            - read-write
            description:
            - Log & Report Threat Weight.
            type: str
        type: dict
      name:
        description:
        - Profile name.
        required: true
        type: str
      netgrp:
        choices:
        - none
        - read
        - read-write
        - custom
        description:
        - Network Configuration.
        type: str
      netgrp_permission:
        description:
        - Custom network permission.
        suboptions:
          cfg:
            choices:
            - none
            - read
            - read-write
            description:
            - Network Configuration.
            type: str
          packet_capture:
            choices:
            - none
            - read
            - read-write
            description:
            - Packet Capture Configuration.
            type: str
          route_cfg:
            choices:
            - none
            - read
            - read-write
            description:
            - Router Configuration.
            type: str
        type: dict
      scope:
        choices:
        - vdom
        - global
        description:
        - 'Scope of admin access: global or specific VDOM(s).'
        type: str
      secfabgrp:
        choices:
        - none
        - read
        - read-write
        description:
        - Security Fabric.
        type: str
      sysgrp:
        choices:
        - none
        - read
        - read-write
        - custom
        description:
        - System Configuration.
        type: str
      sysgrp_permission:
        description:
        - Custom system permission.
        suboptions:
          admin:
            choices:
            - none
            - read
            - read-write
            description:
            - Administrator Users.
            type: str
          cfg:
            choices:
            - none
            - read
            - read-write
            description:
            - System Configuration.
            type: str
          mnt:
            choices:
            - none
            - read
            - read-write
            description:
            - Maintenance.
            type: str
          upd:
            choices:
            - none
            - read
            - read-write
            description:
            - FortiGuard Updates.
            type: str
        type: dict
      system_diagnostics:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to run system diagnostic commands.
        type: str
      system_execute_ssh:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to execute SSH commands.
        type: str
      system_execute_telnet:
        choices:
        - enable
        - disable
        description:
        - Enable/disable permission to execute TELNET commands.
        type: str
      utmgrp:
        choices:
        - none
        - read
        - read-write
        - custom
        description:
        - Administrator access to Security Profiles.
        type: str
      utmgrp_permission:
        description:
        - Custom Security Profile permissions.
        suboptions:
          antivirus:
            choices:
            - none
            - read
            - read-write
            description:
            - Antivirus profiles and settings.
            type: str
          application_control:
            choices:
            - none
            - read
            - read-write
            description:
            - Application Control profiles and settings.
            type: str
          casb:
            choices:
            - none
            - read
            - read-write
            description:
            - Inline CASB filter profile and settings
            type: str
          data_leak_prevention:
            choices:
            - none
            - read
            - read-write
            description:
            - DLP profiles and settings.
            type: str
          data_loss_prevention:
            choices:
            - none
            - read
            - read-write
            description:
            - DLP profiles and settings.
            type: str
          dnsfilter:
            choices:
            - none
            - read
            - read-write
            description:
            - DNS Filter profiles and settings.
            type: str
          emailfilter:
            choices:
            - none
            - read
            - read-write
            description:
            - Email Filter and settings.
            type: str
          endpoint_control:
            choices:
            - none
            - read
            - read-write
            description:
            - FortiClient Profiles.
            type: str
          file_filter:
            choices:
            - none
            - read
            - read-write
            description:
            - File-filter profiles and settings.
            type: str
          icap:
            choices:
            - none
            - read
            - read-write
            description:
            - ICAP profiles and settings.
            type: str
          ips:
            choices:
            - none
            - read
            - read-write
            description:
            - IPS profiles and settings.
            type: str
          mmsgtp:
            choices:
            - none
            - read
            - read-write
            description:
            - UTM permission.
            type: str
          spamfilter:
            choices:
            - none
            - read
            - read-write
            description:
            - AntiSpam filter and settings.
            type: str
          videofilter:
            choices:
            - none
            - read
            - read-write
            description:
            - Video filter profiles and settings.
            type: str
          virtual_patch:
            choices:
            - none
            - read
            - read-write
            description:
            - Virtual patch profiles and settings.
            type: str
          voip:
            choices:
            - none
            - read
            - read-write
            description:
            - VoIP profiles and settings.
            type: str
          waf:
            choices:
            - none
            - read
            - read-write
            description:
            - Web Application Firewall profiles and settings.
            type: str
          webfilter:
            choices:
            - none
            - read
            - read-write
            description:
            - Web Filter profiles and settings.
            type: str
        type: dict
      vpngrp:
        choices:
        - none
        - read
        - read-write
        description:
        - Administrator access to IPsec, SSL, PPTP, and L2TP VPN.
        type: str
      wanoptgrp:
        choices:
        - none
        - read
        - read-write
        description:
        - Administrator access to WAN Opt & Cache.
        type: str
      wifi:
        choices:
        - none
        - read
        - read-write
        description:
        - Administrator access to the WiFi controller and Switch controller.
        type: str
    type: dict

Outputs

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