fortinet.fortios.fortios_system_modem (2.3.6) — module

Configure MODEM in Fortinet's FortiOS and FortiGate.

| "added in version" 2.0.0 of fortinet.fortios"

Authors: Link Zheng (@chillancezen), Jie Xue (@JieX19), Hongbin Lu (@fgtdev-hblu), Frank Shen (@frankshen01), Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico)

preview | supported by community

Install collection

Install with ansible-galaxy collection install fortinet.fortios:==2.3.6


Add to requirements.yml

  collections:
    - name: fortinet.fortios
      version: 2.3.6

Description

This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and modem category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure MODEM.
  fortinet.fortios.fortios_system_modem:
      vdom: "{{ vdom }}"
      system_modem:
          action: "dial"
          altmode: "enable"
          authtype1: "pap"
          authtype2: "pap"
          authtype3: "pap"
          auto_dial: "enable"
          connect_timeout: "90"
          dial_cmd1: "<your_own_value>"
          dial_cmd2: "<your_own_value>"
          dial_cmd3: "<your_own_value>"
          dial_on_demand: "enable"
          distance: "1"
          dont_send_CR1: "enable"
          dont_send_CR2: "enable"
          dont_send_CR3: "enable"
          extra_init1: "<your_own_value>"
          extra_init2: "<your_own_value>"
          extra_init3: "<your_own_value>"
          holddown_timer: "60"
          idle_timer: "5"
          interface: "<your_own_value> (source system.interface.name)"
          lockdown_lac: "<your_own_value>"
          mode: "standalone"
          network_init: "<your_own_value>"
          passwd1: "<your_own_value>"
          passwd2: "<your_own_value>"
          passwd3: "<your_own_value>"
          peer_modem1: "generic"
          peer_modem2: "generic"
          peer_modem3: "generic"
          phone1: "<your_own_value>"
          phone2: "<your_own_value>"
          phone3: "<your_own_value>"
          pin_init: "<your_own_value>"
          ppp_echo_request1: "enable"
          ppp_echo_request2: "enable"
          ppp_echo_request3: "enable"
          priority: "1"
          redial: "none"
          reset: "0"
          status: "enable"
          traffic_check: "enable"
          username1: "<your_own_value>"
          username2: "<your_own_value>"
          username3: "<your_own_value>"
          wireless_port: "0"

Inputs

    
vdom:
    default: root
    description:
    - Virtual domain, among those defined previously. A vdom is a virtual instance of
      the FortiGate that can be configured and used as a different unit.
    type: str

enable_log:
    default: false
    description:
    - Enable/Disable logging for task.
    required: false
    type: bool

member_path:
    description:
    - Member attribute path to operate on.
    - Delimited by a slash character if there are more than one attribute.
    - Parameter marked with member_path is legitimate for doing member operation.
    type: str

access_token:
    description:
    - Token-based authentication. Generated from GUI of Fortigate.
    required: false
    type: str

member_state:
    choices:
    - present
    - absent
    description:
    - Add or delete a member under specified attribute path.
    - When member_state is specified, the state option is ignored.
    type: str

system_modem:
    default: null
    description:
    - Configure MODEM.
    suboptions:
      action:
        choices:
        - dial
        - stop
        - none
        description:
        - Dial up/stop MODEM.
        type: str
      altmode:
        choices:
        - enable
        - disable
        description:
        - Enable/disable altmode for installations using PPP in China.
        type: str
      authtype1:
        choices:
        - pap
        - chap
        - mschap
        - mschapv2
        description:
        - Allowed authentication types for ISP 1.
        elements: str
        type: list
      authtype2:
        choices:
        - pap
        - chap
        - mschap
        - mschapv2
        description:
        - Allowed authentication types for ISP 2.
        elements: str
        type: list
      authtype3:
        choices:
        - pap
        - chap
        - mschap
        - mschapv2
        description:
        - Allowed authentication types for ISP 3.
        elements: str
        type: list
      auto_dial:
        choices:
        - enable
        - disable
        description:
        - Enable/disable auto-dial after a reboot or disconnection.
        type: str
      connect_timeout:
        description:
        - Connection completion timeout (30 - 255 sec).
        type: int
      dial_cmd1:
        description:
        - Dial command (this is often an ATD or ATDT command).
        type: str
      dial_cmd2:
        description:
        - Dial command (this is often an ATD or ATDT command).
        type: str
      dial_cmd3:
        description:
        - Dial command (this is often an ATD or ATDT command).
        type: str
      dial_on_demand:
        choices:
        - enable
        - disable
        description:
        - Enable/disable to dial the modem when packets are routed to the modem interface.
        type: str
      distance:
        description:
        - Distance of learned routes (1 - 255).
        type: int
      dont_send_CR1:
        choices:
        - enable
        - disable
        description:
        - Do not send CR when connected (ISP1).
        type: str
      dont_send_CR2:
        choices:
        - enable
        - disable
        description:
        - Do not send CR when connected (ISP2).
        type: str
      dont_send_CR3:
        choices:
        - enable
        - disable
        description:
        - Do not send CR when connected (ISP3).
        type: str
      extra_init1:
        description:
        - Extra initialization string to ISP 1.
        type: str
      extra_init2:
        description:
        - Extra initialization string to ISP 2.
        type: str
      extra_init3:
        description:
        - Extra initialization string to ISP 3.
        type: str
      holddown_timer:
        description:
        - Hold down timer in seconds (1 - 60 sec).
        type: int
      idle_timer:
        description:
        - MODEM connection idle time (1 - 9999 min).
        type: int
      interface:
        description:
        - Name of redundant interface. Source system.interface.name.
        type: str
      lockdown_lac:
        description:
        - Allow connection only to the specified Location Area Code (LAC).
        type: str
      mode:
        choices:
        - standalone
        - redundant
        description:
        - Set MODEM operation mode to redundant or standalone.
        type: str
      network_init:
        description:
        - AT command to set the Network name/type (AT+COPS=<mode>,[<format>,<oper>[,<AcT>]]).
        type: str
      passwd1:
        description:
        - Password to access the specified dialup account.
        type: str
      passwd2:
        description:
        - Password to access the specified dialup account.
        type: str
      passwd3:
        description:
        - Password to access the specified dialup account.
        type: str
      peer_modem1:
        choices:
        - generic
        - actiontec
        - ascend_TNT
        description:
        - Specify peer MODEM type for phone1.
        type: str
      peer_modem2:
        choices:
        - generic
        - actiontec
        - ascend_TNT
        description:
        - Specify peer MODEM type for phone2.
        type: str
      peer_modem3:
        choices:
        - generic
        - actiontec
        - ascend_TNT
        description:
        - Specify peer MODEM type for phone3.
        type: str
      phone1:
        description:
        - Phone number to connect to the dialup account (must not contain spaces, and
          should include standard special characters).
        type: str
      phone2:
        description:
        - Phone number to connect to the dialup account (must not contain spaces, and
          should include standard special characters).
        type: str
      phone3:
        description:
        - Phone number to connect to the dialup account (must not contain spaces, and
          should include standard special characters).
        type: str
      pin_init:
        description:
        - AT command to set the PIN (AT+PIN=<pin>).
        type: str
      ppp_echo_request1:
        choices:
        - enable
        - disable
        description:
        - Enable/disable PPP echo-request to ISP 1.
        type: str
      ppp_echo_request2:
        choices:
        - enable
        - disable
        description:
        - Enable/disable PPP echo-request to ISP 2.
        type: str
      ppp_echo_request3:
        choices:
        - enable
        - disable
        description:
        - Enable/disable PPP echo-request to ISP 3.
        type: str
      priority:
        description:
        - Priority of learned routes (1 - 65535).
        type: int
      redial:
        choices:
        - none
        - '1'
        - '2'
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
        - '9'
        - '10'
        description:
        - Redial limit (1 - 10 attempts, none = redial forever).
        type: str
      reset:
        description:
        - Number of dial attempts before resetting modem (0 = never reset).
        type: int
      status:
        choices:
        - enable
        - disable
        description:
        - Enable/disable Modem support (equivalent to bringing an interface up or down).
        type: str
      traffic_check:
        choices:
        - enable
        - disable
        description:
        - Enable/disable traffic-check.
        type: str
      username1:
        description:
        - User name to access the specified dialup account.
        type: str
      username2:
        description:
        - User name to access the specified dialup account.
        type: str
      username3:
        description:
        - User name to access the specified dialup account.
        type: str
      wireless_port:
        description:
        - 'Enter wireless port number: 0 for default, 1 for first port, and so on (0 -
          4294967295).'
        type: int
    type: dict

Outputs

build:
  description: Build number of the fortigate image
  returned: always
  sample: '1547'
  type: str
http_method:
  description: Last method used to provision the content into FortiGate
  returned: always
  sample: PUT
  type: str
http_status:
  description: Last result given by FortiGate on last operation applied
  returned: always
  sample: '200'
  type: str
mkey:
  description: Master key (id) used in the last call to FortiGate
  returned: success
  sample: id
  type: str
name:
  description: Name of the table used to fulfill the request
  returned: always
  sample: urlfilter
  type: str
path:
  description: Path of the table used to fulfill the request
  returned: always
  sample: webfilter
  type: str
revision:
  description: Internal revision number
  returned: always
  sample: 17.0.2.10658
  type: str
serial:
  description: Serial number of the unit
  returned: always
  sample: FGVMEVYYQT3AB5352
  type: str
status:
  description: Indication of the operation's result
  returned: always
  sample: success
  type: str
vdom:
  description: Virtual domain used
  returned: always
  sample: root
  type: str
version:
  description: Version of the FortiGate
  returned: always
  sample: v5.6.3
  type: str