community.fortios.fmgr_ha module – Manages the High-Availability State of FortiManager Clusters and Nodes.

Note

This module is part of the community.fortios collection (version 1.0.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 community.fortios.

To use it in a playbook, specify: community.fortios.fmgr_ha.

Synopsis

  • Change HA state or settings of FortiManager nodes (Standalone/Master/Slave).

Parameters

Parameter

Comments

fmgr_ha_cluster_id

string

Sets the ID number of the HA cluster. Defaults to 1.

Default: 1

fmgr_ha_cluster_pw

string

Sets the password for the HA cluster. Only required once. System remembers between HA mode switches.

fmgr_ha_file_quota

string

Sets the File quota in MB (2048-20480).

Default: 4096

fmgr_ha_hb_interval

string

Sets the heartbeat interval (1-255).

Default: 5

fmgr_ha_hb_threshold

string

Sets heartbeat lost threshold (1-255).

Default: 3

fmgr_ha_mode

string

Sets the role of the FortiManager host for HA.

Choices:

  • standalone

  • master

  • slave

fmgr_ha_peer_ipv4

string

Sets the IPv4 address of a HA peer.

fmgr_ha_peer_ipv6

string

Sets the IPv6 address of a HA peer.

fmgr_ha_peer_sn

string

Sets the HA Peer Serial Number.

fmgr_ha_peer_status

string

Sets the peer status to enable or disable.

Choices:

  • enable

  • disable

Notes

Examples

- name: SET FORTIMANAGER HA NODE TO MASTER
  community.fortios.fmgr_ha:
    fmgr_ha_mode: "master"
    fmgr_ha_cluster_pw: "fortinet"
    fmgr_ha_cluster_id: "1"

- name: SET FORTIMANAGER HA NODE TO SLAVE
  community.fortios.fmgr_ha:
    fmgr_ha_mode: "slave"
    fmgr_ha_cluster_pw: "fortinet"
    fmgr_ha_cluster_id: "1"

- name: SET FORTIMANAGER HA NODE TO STANDALONE
  community.fortios.fmgr_ha:
    fmgr_ha_mode: "standalone"

- name: ADD FORTIMANAGER HA PEER
  community.fortios.fmgr_ha:
    fmgr_ha_peer_ipv4: "192.168.1.254"
    fmgr_ha_peer_sn: "FMG-VM1234567890"
    fmgr_ha_peer_status: "enable"

- name: CREATE CLUSTER ON MASTER
  community.fortios.fmgr_ha:
    fmgr_ha_mode: "master"
    fmgr_ha_cluster_pw: "fortinet"
    fmgr_ha_cluster_id: "1"
    fmgr_ha_hb_threshold: "10"
    fmgr_ha_hb_interval: "15"
    fmgr_ha_file_quota: "2048"

Return Values

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

Key

Description

api_result

string

full API response, includes status code and message

Returned: always

Authors

  • Luke Weighall (@lweighall)

  • Andrew Welsh (@Ghilli3)

  • Jim Huber (@p4r4n0y1ng)