fortios_system_modem – Configure MODEM in Fortinet’s FortiOS and FortiGate.

New in version 2.0.0.

Synopsis

  • 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

The below requirements are needed on the host that executes this module.

  • ansible>=2.14

Tips

Using member operation to add an element to an existing object.

FortiOS Version Compatibility


Supported Version Ranges
fortios_system_modem v6.0.0 -> latest

Parameters

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

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- 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"

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

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

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.