fortinet.fortimanager.fmgr_devprof_system_centralmanagement module – Configure central management.

Note

This module is part of the fortinet.fortimanager collection (version 2.8.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install fortinet.fortimanager.

To use it in a playbook, specify: fortinet.fortimanager.fmgr_devprof_system_centralmanagement.

New in fortinet.fortimanager 1.0.0

Synopsis

  • This module is able to configure a FortiManager device.

  • Examples include all parameters and values which need to be adjusted to data sources before usage.

Parameters

Parameter

Comments

access_token

string

The token to access FortiManager without using username and password.

adom

string / required

The parameter (adom) in requested url.

bypass_validation

boolean

Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters.

Choices:

  • false ← (default)

  • true

devprof

string / required

The parameter (devprof) in requested url.

devprof_system_centralmanagement

dictionary

The top level parameters set.

allow_monitor

string

Enable/disable allowing the central management server to remotely monitor this FortiGate unit.

Choices:

  • "disable"

  • "enable"

allow_push_configuration

string

Enable/disable allowing the central management server to push configuration changes to this FortiGate.

Choices:

  • "disable"

  • "enable"

allow_push_firmware

string

Enable/disable allowing the central management server to push firmware updates to this FortiGate.

Choices:

  • "disable"

  • "enable"

allow_remote_firmware_upgrade

string

Enable/disable remotely upgrading the firmware on this FortiGate from the central management server.

Choices:

  • "disable"

  • "enable"

allow_remote_lte_firmware_upgrade

string

Enable/disable remotely upgrading the lte firmware on this FortiGate from the central management server.

Choices:

  • "disable"

  • "enable"

allow_remote_modem_firmware_upgrade

string

Enable/disable remotely upgrading the internal cellular modem firmware on this FortiGate from the central management server.

Choices:

  • "disable"

  • "enable"

ca_cert

string

CA certificate to be used by FGFM protocol.

enc_algorithm

string

Encryption strength for communications between the FortiGate and central management.

Choices:

  • "default"

  • "high"

  • "low"

fmg

any

(list) IP address or FQDN of the FortiManager.

fmg_source_ip

string

IPv4 source address that this FortiGate uses when communicating with FortiManager.

fmg_source_ip6

string

IPv6 source address that this FortiGate uses when communicating with FortiManager.

fmg_update_port

string

Port used to communicate with FortiManager that is acting as a FortiGuard update server.

Choices:

  • "443"

  • "8890"

fortigate_cloud_sso_default_profile

any

(list) Override access profile.

include_default_servers

string

Enable/disable inclusion of public FortiGuard servers in the override server list.

Choices:

  • "disable"

  • "enable"

interface

any

(list) Specify outgoing interface to reach server.

interface_select_method

string

Specify how to select outgoing interface to reach server.

Choices:

  • "auto"

  • "sdwan"

  • "specify"

local_cert

string

Certificate to be used by FGFM protocol.

ltefw_upgrade_frequency

string

Set LTE firmware auto pushdown frequency.

Choices:

  • "everyHour"

  • "every12hour"

  • "everyDay"

  • "everyWeek"

ltefw_upgrade_time

string

Schedule next LTE firmware upgrade time

mode

string

Central management mode.

Choices:

  • "normal"

  • "backup"

modem_upgrade_frequency

string

Set internal cellular modem firmware auto pushdown frequency.

Choices:

  • "everyHour"

  • "every12hour"

  • "everyDay"

  • "everyWeek"

modem_upgrade_time

string

Schedule next internal cellular modem firmware upgrade time

schedule_config_restore

string

Enable/disable allowing the central management server to restore the configuration of this FortiGate.

Choices:

  • "disable"

  • "enable"

schedule_script_restore

string

Enable/disable allowing the central management server to restore the scripts stored on this FortiGate.

Choices:

  • "disable"

  • "enable"

serial_number

any

(list) Serial number.

server_list

list / elements=dictionary

Server list.

addr_type

string

Indicate whether the FortiGate communicates with the override server using an IPv4 address, an IPv6 address or a FQDN.

Choices:

  • "fqdn"

  • "ipv4"

  • "ipv6"

fqdn

string

FQDN address of override server.

id

integer

ID.

server_address

string

IPv4 address of override server.

server_address6

string

IPv6 address of override server.

server_type

list / elements=string

FortiGuard service type.

Choices:

  • "update"

  • "rating"

  • "iot-query"

  • "iot-collect"

  • "vpatch-query"

type

string

Central management type.

Choices:

  • "fortimanager"

  • "fortiguard"

  • "none"

use_elbc_vdom

string

Enable/disable use of special ELBC config sync VDOM to connect to FortiManager.

Choices:

  • "disable"

  • "enable"

vdom

any

(list) Virtual domain

enable_log

boolean

Enable/Disable logging for task.

Choices:

  • false ← (default)

  • true

forticloud_access_token

string

Authenticate Ansible client with forticloud API access token.

proposed_method

string

The overridden method for the underlying Json RPC request.

Choices:

  • "update"

  • "set"

  • "add"

rc_failed

list / elements=integer

The rc codes list with which the conditions to fail will be overriden.

rc_succeeded

list / elements=integer

The rc codes list with which the conditions to succeed will be overriden.

workspace_locking_adom

string

The adom to lock for FortiManager running in workspace mode, the value can be global and others including root.

workspace_locking_timeout

integer

The maximum time in seconds to wait for other user to release the workspace lock.

Default: 300

Notes

Note

  • Starting in version 2.4.0, all input arguments are named using the underscore naming convention (snake_case). Please change the arguments such as “var-name” to “var_name”. Old argument names are still available yet you will receive deprecation warnings. You can ignore this warning by setting deprecation_warnings=False in ansible.cfg.

  • 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.

  • 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: Configure central management.
      fortinet.fortimanager.fmgr_devprof_system_centralmanagement:
        # 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, ...]
        adom: <your own value>
        devprof: <your own value>
        devprof_system_centralmanagement:
          include_default_servers: <value in [disable, enable]>
          server_list:
            -
              addr_type: <value in [fqdn, ipv4, ipv6]>
              fqdn: <string>
              id: <integer>
              server_address: <string>
              server_address6: <string>
              server_type:
                - "update"
                - "rating"
                - "iot-query"
                - "iot-collect"
                - "vpatch-query"
          ltefw_upgrade_time: <string>
          vdom: <list or string>
          allow_remote_firmware_upgrade: <value in [disable, enable]>
          local_cert: <string>
          allow_push_firmware: <value in [disable, enable]>
          ltefw_upgrade_frequency: <value in [everyHour, every12hour, everyDay, ...]>
          mode: <value in [normal, backup]>
          serial_number: <list or string>
          fmg_source_ip6: <string>
          allow_monitor: <value in [disable, enable]>
          allow_push_configuration: <value in [disable, enable]>
          ca_cert: <string>
          fmg_update_port: <value in [443, 8890]>
          use_elbc_vdom: <value in [disable, enable]>
          allow_remote_lte_firmware_upgrade: <value in [disable, enable]>
          interface: <list or string>
          schedule_script_restore: <value in [disable, enable]>
          schedule_config_restore: <value in [disable, enable]>
          interface_select_method: <value in [auto, sdwan, specify]>
          type: <value in [fortimanager, fortiguard, none]>
          fmg_source_ip: <string>
          fortigate_cloud_sso_default_profile: <list or string>
          fmg: <list or string>
          enc_algorithm: <value in [default, high, low]>
          allow_remote_modem_firmware_upgrade: <value in [disable, enable]>
          modem_upgrade_frequency: <value in [everyHour, every12hour, everyDay, ...]>
          modem_upgrade_time: <string>

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

meta

dictionary

The result of the request.

Returned: always

request_url

string

The full url requested.

Returned: always

Sample: "/sys/login/user"

response_code

integer

The status of api request.

Returned: always

Sample: 0

response_data

list / elements=string

The api response.

Returned: always

response_message

string

The descriptive message of the api response.

Returned: always

Sample: "OK."

system_information

dictionary

The information of the target system.

Returned: always

rc

integer

The status the request.

Returned: always

Sample: 0

version_check_warning

list / elements=string

Warning if the parameters used in the playbook are not supported by the current FortiManager version.

Returned: complex

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)