fmgr_system_admin_setting – Admin setting.

Added in version 2.0.0.

Warning

Starting in version 3.0.0, all input arguments will be named using the underscore naming convention (snake_case).

  • Argument name before 3.0.0: var-name, var name, var.name

  • New argument name starting in 3.0.0: var_name

FortiManager Ansible v2.4+ supports both previous argument name and new underscore name. You will receive deprecation warnings if you keep using the previous argument name. You can ignore the warning by setting deprecation_warnings=False in ansible.cfg.

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>=2.15.0

FortiManager Version Compatibility

Supported Version Ranges: v6.0.0 -> latest

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 (Alias name: access-banner) Enable/disable access banner. type: str choices: [disable, enable] default: disable more...
    • admin_https_redirect (Alias name: admin-https-redirect) Enable/disable redirection of http admin traffic to https. type: str choices: [disable, enable] default: enable more...
    • admin_login_max (Alias name: 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 (Alias name: auto-update) Enable/disable fortigate automatic update. type: str choices: [disable, enable] default: enable more...
    • banner_message (Alias name: banner-message) Banner message. type: str more...
    • chassis_mgmt (Alias name: chassis-mgmt) Enable or disable chassis management. type: str choices: [disable, enable] default: disable more...
    • chassis_update_interval (Alias name: 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 (Alias name: 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 (Alias name: install-ifpolicy-only) Allow install interface policy only. type: str choices: [disable, enable] default: disable more...
    • mgmt_addr (Alias name: mgmt-addr) Ip of fortimanager used by fgfm. type: str more...
    • mgmt_fqdn (Alias name: mgmt-fqdn) Fqdn of fortimanager used by fgfm. type: str more...
    • objects_force_deletion (Alias name: 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: list more...
    • sdwan_monitor_history (Alias name: sdwan-monitor-history) Enable/disable hostname display in the gui login page. type: str choices: [disable, enable] default: disable more...
    • shell_access (Alias name: shell-access) Enable/disable shell access. type: str choices: [disable, enable] default: disable more...
    • shell_password (Alias name: shell-password) Password for shell access. type: list more...
    • show_add_multiple (Alias name: show-add-multiple) Show add multiple button. type: str choices: [disable, enable] default: disable more...
    • show_adom_devman (Alias name: show-adom-devman) Show adom device manager tools on gui. type: str choices: [disable, enable] default: enable more...
    • show_checkbox_in_table (Alias name: show-checkbox-in-table) Show checkboxs in tables on gui. type: str choices: [disable, enable] default: disable more...
    • show_device_import_export (Alias name: show-device-import-export) Enable/disable import/export of adom, device, and group lists. type: str choices: [disable, enable] default: disable more...
    • show_hostname (Alias name: 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 (Alias name: show-fct-manager) Enable/disable fct manager. type: str choices: [disable, enable] default: disable more...
    • sdwan_skip_unmapped_input_device (Alias name: 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 (Alias name: auth-addr) Ip which is used by fgt to authorize fmg. type: str more...
    • auth_port (Alias name: 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 (Alias name: 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 (Alias name: preferred-fgfm-intf) Preferred interface for fgfm connection. type: str more...
    • traffic_shaping_history (Alias name: traffic-shaping-history) Enable/disable traffic-shaping-history. type: str choices: [disable, enable] default: disable more...
    • fsw_ignore_platform_check (Alias name: 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 (Alias name: 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 (Alias name: rtm-temp-file-limit) Set rtm monitor temp file limit by hours. type: int default: 48 more...
    • firmware_upgrade_check (Alias name: firmware-upgrade-check) Enable/disable firmware upgrade check. type: str choices: [disable, enable] default: enable more...
    • fgt_gui_proxy (Alias name: fgt-gui-proxy) Enable/disable fortigate gui proxy. type: str choices: [disable, enable] default: enable more...
    • fgt_gui_proxy_port (Alias name: fgt-gui-proxy-port) Fortigate gui proxy port. type: int default: 8082 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

- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Admin setting.
      fortinet.fortimanager.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: <integer>
          admin_server_cert: <string>
          allow_register: <value in [disable, enable]>
          auto_update: <value in [disable, enable]>
          banner_message: <string>
          chassis_mgmt: <value in [disable, enable]>
          chassis_update_interval: <integer>
          device_sync_status: <value in [disable, enable]>
          gui_theme: <value in [blue, green, red, ...]>
          http_port: <integer>
          https_port: <integer>
          idle_timeout: <integer>
          install_ifpolicy_only: <value in [disable, enable]>
          mgmt_addr: <string>
          mgmt_fqdn: <string>
          objects_force_deletion: <value in [disable, enable]>
          offline_mode: <value in [disable, enable]>
          register_passwd: <list or string>
          sdwan_monitor_history: <value in [disable, enable]>
          shell_access: <value in [disable, enable]>
          shell_password: <list or 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: <string>
          auth_port: <integer>
          idle_timeout_api: <integer>
          idle_timeout_gui: <integer>
          central_ftgd_local_cat_id: <value in [disable, enable]>
          idle_timeout_sso: <integer>
          preferred_fgfm_intf: <string>
          traffic_shaping_history: <value in [disable, enable]>
          fsw_ignore_platform_check: <value in [disable, enable]>
          rtm_max_monitor_by_days: <integer>
          rtm_temp_file_limit: <integer>
          firmware_upgrade_check: <value in [disable, enable]>
          fgt_gui_proxy: <value in [disable, enable]>
          fgt_gui_proxy_port: <integer>

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 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)