community.general.fmgr_ha (0.1.1) — module

Manages the High-Availability State of FortiManager Clusters and Nodes.

Authors: Luke Weighall (@lweighall), Andrew Welsh (@Ghilli3), Jim Huber (@p4r4n0y1ng)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: SET FORTIMANAGER HA NODE TO MASTER
  fmgr_ha:
    fmgr_ha_mode: "master"
    fmgr_ha_cluster_pw: "fortinet"
    fmgr_ha_cluster_id: "1"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: SET FORTIMANAGER HA NODE TO SLAVE
  fmgr_ha:
    fmgr_ha_mode: "slave"
    fmgr_ha_cluster_pw: "fortinet"
    fmgr_ha_cluster_id: "1"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: SET FORTIMANAGER HA NODE TO STANDALONE
  fmgr_ha:
    fmgr_ha_mode: "standalone"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: ADD FORTIMANAGER HA PEER
  fmgr_ha:
    fmgr_ha_peer_ipv4: "192.168.1.254"
    fmgr_ha_peer_sn: "FMG-VM1234567890"
    fmgr_ha_peer_status: "enable"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: CREATE CLUSTER ON MASTER
  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"

Inputs

    
fmgr_ha_mode:
    choices:
    - standalone
    - master
    - slave
    description:
    - Sets the role of the FortiManager host for HA.
    required: false

fmgr_ha_peer_sn:
    description:
    - Sets the HA Peer Serial Number.
    required: false

fmgr_ha_peer_ipv4:
    description:
    - Sets the IPv4 address of a HA peer.
    required: false

fmgr_ha_peer_ipv6:
    description:
    - Sets the IPv6 address of a HA peer.
    required: false

fmgr_ha_cluster_id:
    default: 1
    description:
    - Sets the ID number of the HA cluster. Defaults to 1.
    required: false

fmgr_ha_cluster_pw:
    description:
    - Sets the password for the HA cluster. Only required once. System remembers between
      HA mode switches.
    required: false

fmgr_ha_file_quota:
    default: 4096
    description:
    - Sets the File quota in MB (2048-20480).
    required: false

fmgr_ha_hb_interval:
    default: 5
    description:
    - Sets the heartbeat interval (1-255).
    required: false

fmgr_ha_peer_status:
    choices:
    - enable
    - disable
    description:
    - Sets the peer status to enable or disable.
    required: false

fmgr_ha_hb_threshold:
    default: 3
    description:
    - Sets heartbeat lost threshold (1-255).
    required: false

Outputs

api_result:
  description: full API response, includes status code and message
  returned: always
  type: str