fmgr_system_admin_setting – Admin setting.

New in version 2.0.0.

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.x and v7.x.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

FortiManager Version Compatibility


6.0.0
True
6.2.0 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.2.10
True True True True True True True True True True
6.4.0 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 6.4.6 6.4.7 6.4.8 6.4.9 6.4.10 6.4.11
True True True True True True True True True True True True
7.0.0 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7
True True True True True True True True
7.2.0 7.2.1 7.2.2
True True True
7.4.0
True

Parameters

  • 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
  • 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
  • system_admin_setting - Admin setting. type: dict
    • access-banner - Enable/disable access banner. type: str choices: [disable, enable] default: disable more...
    • admin-https-redirect - Enable/disable redirection of HTTP admin traffic to HTTPS. type: str choices: [disable, enable] default: enable more...
    • admin-login-max - Maximum number admin users logged in at one time (1 - 256). type: int default: 256 more...
    • admin_server_cert - HTTPS & Web Service server certificate. type: str default: server.crt more...
    • allow_register - Enable/disable allowance of register an unregistered device. type: str choices: [disable, enable] default: disable more...
    • auto-update - Enable/disable FortiGate automatic update. type: str choices: [disable, enable] default: enable more...
    • banner-message - Banner message. type: str more...
    • chassis-mgmt - Enable or disable chassis management. type: str choices: [disable, enable] default: disable more...
    • chassis-update-interval - Chassis background update interval (4 - 1440 mins). type: int default: 15 more...
    • device_sync_status - Enable/disable device synchronization status indication. type: str choices: [disable, enable] default: enable more...
    • gui-theme - Color scheme to use for the administration GUI. type: str choices: [blue, green, red, melongene, spring, summer, autumn, winter, space, calla-lily, binary-tunnel, diving, dreamy, technology, landscape, twilight, canyon, northern-light, astronomy, fish, penguin, panda, polar-bear, parrot, cave, mountain, zebra, contrast-dark, circuit-board, mars, blue-sea, mariner, jade, neutrino, dark-matter, forest, cat, graphite] default: blue more...
    • http_port - HTTP port. type: int default: 80 more...
    • https_port - HTTPS port. type: int default: 443 more...
    • idle_timeout - Idle timeout (1 - 480 min). type: int default: 15 more...
    • install-ifpolicy-only - Allow install interface policy only. type: str choices: [disable, enable] default: disable more...
    • mgmt-addr - IP of FortiManager used by FGFM. type: str more...
    • mgmt-fqdn - FQDN of FortiManager used by FGFM. type: str more...
    • objects-force-deletion - Enable/disable used objects force deletion. type: str choices: [disable, enable] default: enable more...
    • offline_mode - Enable/disable offline mode. type: str choices: [disable, enable] default: disable more...
    • register_passwd - Password for register a device. type: str more...
    • sdwan-monitor-history - Enable/disable hostname display in the GUI login page. type: str choices: [disable, enable] default: disable more...
    • shell-access - Enable/disable shell access. type: str choices: [disable, enable] default: disable more...
    • shell-password - Password for shell access. type: str more...
    • show-add-multiple - Show add multiple button. type: str choices: [disable, enable] default: disable more...
    • show-adom-devman - Show ADOM device manager tools on GUI. type: str choices: [disable, enable] default: enable more...
    • show-checkbox-in-table - Show checkboxs in tables on GUI. type: str choices: [disable, enable] default: disable more...
    • show-device-import-export - Enable/disable import/export of ADOM, device, and group lists. type: str choices: [disable, enable] default: disable more...
    • show-hostname - Enable/disable hostname display in the GUI login page. type: str choices: [disable, enable] default: disable more...
    • show_automatic_script - Enable/disable automatic script. type: str choices: [disable, enable] default: disable more...
    • show_grouping_script - Enable/disable grouping script. type: str choices: [disable, enable] default: enable more...
    • show_schedule_script - Enable or disable schedule script. type: str choices: [disable, enable] default: disable more...
    • show_tcl_script - Enable/disable TCL script. type: str choices: [disable, enable] default: disable more...
    • unreg_dev_opt - Action to take when unregistered device connects to FortiManager. type: str choices: [add_no_service, ignore, add_allow_service] default: add_allow_service more...
    • webadmin_language - Web admin language. type: str choices: [auto_detect, english, simplified_chinese, traditional_chinese, japanese, korean, spanish, french] default: auto_detect more...
    • show-fct-manager - Enable/disable FCT manager. type: str choices: [disable, enable] default: disable more...
    • sdwan-skip-unmapped-input-device - Skip unmapped interface for sdwan/rule/input-device instead of report mapping error. type: str choices: [disable, enable] default: disable more...
    • auth-addr - IP which is used by FGT to authorize FMG. type: str more...
    • auth-port - Port which is used by FGT to authorize FMG. type: int default: 443 more...
    • idle_timeout_api - Idle timeout for API sessions (1 - 28800 sec). type: int default: 900 more...
    • idle_timeout_gui - Idle timeout for GUI sessions (60 - 28800 sec). type: int default: 900 more...
    • central-ftgd-local-cat-id - Central FortiGuard local category id management, and do not auto assign id during installation. type: str choices: [disable, enable] default: disable more...
    • idle_timeout_sso - Idle timeout for SSO sessions (60 - 28800 sec). type: int default: 900 more...
    • preferred-fgfm-intf - Preferred interface for FGFM connection. type: str more...
    • traffic-shaping-history - Enable/disable traffic-shaping-history. type: str choices: [disable, enable] default: disable more...
    • fsw-ignore-platform-check - Enable/disable FortiSwitch Manager switch platform support check. type: str choices: [disable, enable] default: disable more...
    • rtm-max-monitor-by-days - Maximum rtm monitor (sdwan, traffic shaping, etc) history by days (1 - 180). type: int default: 180 more...
    • rtm-temp-file-limit - Set rtm monitor temp file limit by hours. type: int default: 48 more...
    • firmware-upgrade-check - Enable/disable firmware upgrade check. type: str choices: [disable, enable] default: enable more...

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: Admin setting.
     fmgr_system_admin_setting:
        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, ...]
        system_admin_setting:
           access-banner: <value in [disable, enable]>
           admin-https-redirect: <value in [disable, enable]>
           admin-login-max: <value of integer>
           admin_server_cert: <value of string>
           allow_register: <value in [disable, enable]>
           auto-update: <value in [disable, enable]>
           banner-message: <value of string>
           chassis-mgmt: <value in [disable, enable]>
           chassis-update-interval: <value of integer>
           device_sync_status: <value in [disable, enable]>
           gui-theme: <value in [blue, green, red, ...]>
           http_port: <value of integer>
           https_port: <value of integer>
           idle_timeout: <value of integer>
           install-ifpolicy-only: <value in [disable, enable]>
           mgmt-addr: <value of string>
           mgmt-fqdn: <value of string>
           objects-force-deletion: <value in [disable, enable]>
           offline_mode: <value in [disable, enable]>
           register_passwd: <value of string>
           sdwan-monitor-history: <value in [disable, enable]>
           shell-access: <value in [disable, enable]>
           shell-password: <value of string>
           show-add-multiple: <value in [disable, enable]>
           show-adom-devman: <value in [disable, enable]>
           show-checkbox-in-table: <value in [disable, enable]>
           show-device-import-export: <value in [disable, enable]>
           show-hostname: <value in [disable, enable]>
           show_automatic_script: <value in [disable, enable]>
           show_grouping_script: <value in [disable, enable]>
           show_schedule_script: <value in [disable, enable]>
           show_tcl_script: <value in [disable, enable]>
           unreg_dev_opt: <value in [add_no_service, ignore, add_allow_service]>
           webadmin_language: <value in [auto_detect, english, simplified_chinese, ...]>
           show-fct-manager: <value in [disable, enable]>
           sdwan-skip-unmapped-input-device: <value in [disable, enable]>
           auth-addr: <value of string>
           auth-port: <value of integer>
           idle_timeout_api: <value of integer>
           idle_timeout_gui: <value of integer>
           central-ftgd-local-cat-id: <value in [disable, enable]>
           idle_timeout_sso: <value of integer>
           preferred-fgfm-intf: <value of string>
           traffic-shaping-history: <value in [disable, enable]>
           fsw-ignore-platform-check: <value in [disable, enable]>
           rtm-max-monitor-by-days: <value of integer>
           rtm-temp-file-limit: <value of integer>
           firmware-upgrade-check: <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:

  • 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 0
  • version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least on parameter mpt supported by the current FortiManager version type: list 0

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)

Hint

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