Skip to content

Latest commit

 

History

History
998 lines (954 loc) · 43 KB

fortios_system_modem.rst

File metadata and controls

998 lines (954 loc) · 43 KB
source:fortios_system_modem.py
orphan:

fortios_system_modem -- Configure MODEM in Fortinet's FortiOS and FortiGate.

.. versionadded:: 2.0.0

  • 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

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

  • ansible>=2.14

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


Supported Version Ranges
fortios_system_modem v6.0.0 -> latest

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

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- 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"

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
  • This module is not guaranteed to have a backwards compatible interface.
  • 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.