community.general.fmgr_device_config (0.1.1) — module

Edit device configurations

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

Edit device configurations from FortiManager Device Manager using JSON RPC API.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: CHANGE HOSTNAME
  fmgr_device_config:
    device_hostname: "ChangedbyAnsible"
    device_unique_name: "FGT1"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: EDIT INTERFACE INFORMATION
  fmgr_device_config:
    adom: "root"
    device_unique_name: "FGT2"
    interface: "port3"
    interface_ip: "10.1.1.1/24"
    interface_allow_access: "ping, telnet, https"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: INSTALL CONFIG
  fmgr_device_config:
    adom: "root"
    device_unique_name: "FGT1"
    install_config: "enable"

Inputs

    
adom:
    default: root
    description:
    - The ADOM the configuration should belong to.
    required: false

interface:
    description:
    - The interface/port number you are editing.
    required: false

interface_ip:
    description:
    - The IP and subnet of the interface/port you are editing.
    required: false

install_config:
    default: disable
    description:
    - Tells FMGR to attempt to install the config after making it.
    required: false

device_hostname:
    description:
    - The device's new hostname.
    required: false

device_unique_name:
    description:
    - The unique device's name that you are editing. A.K.A. Friendly name of the device
      in FortiManager.
    required: true

interface_allow_access:
    description:
    - Specify what protocols are allowed on the interface, comma-separated list (see examples).
    required: false

Outputs

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