:source: fortios_system_modem.py
:orphan:
.. fortios_system_modem:
fortios_system_modem -- Configure MODEM in Fortinet's FortiOS and FortiGate.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
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.15
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v6.0.0 -> v7.6.6
Parameters
----------
.. raw:: html
- 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 -> 7.6.6 |
- action - Dial up/stop MODEM. type: str choices: dial, stop, none
more...
|
Supported Version Ranges |
| action |
v6.0.0 -> 7.6.6 |
| [dial] |
v6.0.0 -> 7.6.6 |
| [stop] |
v6.0.0 -> 7.6.6 |
| [none] |
v6.0.0 -> 7.6.6 |
- altmode - Enable/disable altmode for installations using PPP in China. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| altmode |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- authtype1 - Allowed authentication types for ISP 1. type: list choices: pap, chap, mschap, mschapv2
more...
|
Supported Version Ranges |
| authtype1 |
v6.0.0 -> 7.6.6 |
| [pap] |
v6.0.0 -> 7.6.6 |
| [chap] |
v6.0.0 -> 7.6.6 |
| [mschap] |
v6.0.0 -> 7.6.6 |
| [mschapv2] |
v6.0.0 -> 7.6.6 |
- authtype2 - Allowed authentication types for ISP 2. type: list choices: pap, chap, mschap, mschapv2
more...
|
Supported Version Ranges |
| authtype2 |
v6.0.0 -> 7.6.6 |
| [pap] |
v6.0.0 -> 7.6.6 |
| [chap] |
v6.0.0 -> 7.6.6 |
| [mschap] |
v6.0.0 -> 7.6.6 |
| [mschapv2] |
v6.0.0 -> 7.6.6 |
- authtype3 - Allowed authentication types for ISP 3. type: list choices: pap, chap, mschap, mschapv2
more...
|
Supported Version Ranges |
| authtype3 |
v6.0.0 -> 7.6.6 |
| [pap] |
v6.0.0 -> 7.6.6 |
| [chap] |
v6.0.0 -> 7.6.6 |
| [mschap] |
v6.0.0 -> 7.6.6 |
| [mschapv2] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- connect_timeout - Connection completion timeout (30 - 255 sec). type: int
more...
|
Supported Version Ranges |
| connect_timeout |
v6.0.0 -> 7.6.6 |
- dial_cmd1 - Dial command (this is often an ATD or ATDT command). type: str
more...
|
Supported Version Ranges |
| dial_cmd1 |
v6.0.0 -> 7.6.6 |
- dial_cmd2 - Dial command (this is often an ATD or ATDT command). type: str
more...
|
Supported Version Ranges |
| dial_cmd2 |
v6.0.0 -> 7.6.6 |
- dial_cmd3 - Dial command (this is often an ATD or ATDT command). type: str
more...
|
Supported Version Ranges |
| dial_cmd3 |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- distance - Distance of learned routes (1 - 255). type: int
more...
|
Supported Version Ranges |
| distance |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- extra_init1 - Extra initialization string to ISP 1. type: str
more...
|
Supported Version Ranges |
| extra_init1 |
v6.0.0 -> 7.6.6 |
- extra_init2 - Extra initialization string to ISP 2. type: str
more...
|
Supported Version Ranges |
| extra_init2 |
v6.0.0 -> 7.6.6 |
- extra_init3 - Extra initialization string to ISP 3. type: str
more...
|
Supported Version Ranges |
| extra_init3 |
v6.0.0 -> 7.6.6 |
- holddown_timer - Hold down timer in seconds (1 - 60 sec). type: int
more...
|
Supported Version Ranges |
| holddown_timer |
v6.0.0 -> 7.6.6 |
- idle_timer - MODEM connection idle time (1 - 9999 min). type: int
more...
|
Supported Version Ranges |
| idle_timer |
v6.0.0 -> 7.6.6 |
- interface - Name of redundant interface. Source system.interface.name. type: str
more...
|
Supported Version Ranges |
| interface |
v6.0.0 -> 7.6.6 |
- lockdown_lac - Allow connection only to the specified Location Area Code (LAC). type: str
more...
|
Supported Version Ranges |
| lockdown_lac |
v6.0.0 -> 7.6.6 |
- mode - Set MODEM operation mode to redundant or standalone. type: str choices: standalone, redundant
more...
|
Supported Version Ranges |
| mode |
v6.0.0 -> 7.6.6 |
| [standalone] |
v6.0.0 -> 7.6.6 |
| [redundant] |
v6.0.0 -> 7.6.6 |
- network_init - AT command to set the Network name/type (AT+COPS=,[,[,]]). type: str
more...
|
Supported Version Ranges |
| network_init |
v6.0.0 -> 7.6.6 |
- passwd1 - Password to access the specified dialup account. type: str
more...
|
Supported Version Ranges |
| passwd1 |
v6.0.0 -> 7.6.6 |
- passwd2 - Password to access the specified dialup account. type: str
more...
|
Supported Version Ranges |
| passwd2 |
v6.0.0 -> 7.6.6 |
- passwd3 - Password to access the specified dialup account. type: str
more...
|
Supported Version Ranges |
| passwd3 |
v6.0.0 -> 7.6.6 |
- peer_modem1 - Specify peer MODEM type for phone1. type: str choices: generic, actiontec, ascend_TNT
more...
|
Supported Version Ranges |
| peer_modem1 |
v6.0.0 -> 7.6.6 |
| [generic] |
v6.0.0 -> 7.6.6 |
| [actiontec] |
v6.0.0 -> 7.6.6 |
| [ascend_TNT] |
v6.0.0 -> 7.6.6 |
- peer_modem2 - Specify peer MODEM type for phone2. type: str choices: generic, actiontec, ascend_TNT
more...
|
Supported Version Ranges |
| peer_modem2 |
v6.0.0 -> 7.6.6 |
| [generic] |
v6.0.0 -> 7.6.6 |
| [actiontec] |
v6.0.0 -> 7.6.6 |
| [ascend_TNT] |
v6.0.0 -> 7.6.6 |
- peer_modem3 - Specify peer MODEM type for phone3. type: str choices: generic, actiontec, ascend_TNT
more...
|
Supported Version Ranges |
| peer_modem3 |
v6.0.0 -> 7.6.6 |
| [generic] |
v6.0.0 -> 7.6.6 |
| [actiontec] |
v6.0.0 -> 7.6.6 |
| [ascend_TNT] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
- 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 -> 7.6.6 |
- 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 -> 7.6.6 |
- pin_init - AT command to set the PIN (AT+PIN=). type: str
more...
|
Supported Version Ranges |
| pin_init |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- priority - Priority of learned routes (1 - 65535). type: int
more...
|
Supported Version Ranges |
| priority |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [none] |
v6.0.0 -> 7.6.6 |
| [1] |
v6.0.0 -> 7.6.6 |
| [2] |
v6.0.0 -> 7.6.6 |
| [3] |
v6.0.0 -> 7.6.6 |
| [4] |
v6.0.0 -> 7.6.6 |
| [5] |
v6.0.0 -> 7.6.6 |
| [6] |
v6.0.0 -> 7.6.6 |
| [7] |
v6.0.0 -> 7.6.6 |
| [8] |
v6.0.0 -> 7.6.6 |
| [9] |
v6.0.0 -> 7.6.6 |
| [10] |
v6.0.0 -> 7.6.6 |
- reset - Number of dial attempts before resetting modem (0 = never reset). type: int
more...
|
Supported Version Ranges |
| reset |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- traffic_check - Enable/disable traffic-check. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| traffic_check |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- username1 - User name to access the specified dialup account. type: str
more...
|
Supported Version Ranges |
| username1 |
v6.0.0 -> 7.6.6 |
- username2 - User name to access the specified dialup account. type: str
more...
|
Supported Version Ranges |
| username2 |
v6.0.0 -> 7.6.6 |
- username3 - User name to access the specified dialup account. type: str
more...
|
Supported Version Ranges |
| username3 |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- 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: ""
dial_cmd2: ""
dial_cmd3: ""
dial_on_demand: "enable"
distance: "1"
dont_send_CR1: "enable"
dont_send_CR2: "enable"
dont_send_CR3: "enable"
extra_init1: ""
extra_init2: ""
extra_init3: ""
holddown_timer: "60"
idle_timer: "5"
interface: " (source system.interface.name)"
lockdown_lac: ""
mode: "standalone"
network_init: ""
passwd1: ""
passwd2: ""
passwd3: ""
peer_modem1: "generic"
peer_modem2: "generic"
peer_modem3: "generic"
phone1: ""
phone2: ""
phone3: ""
pin_init: ""
ppp_echo_request1: "enable"
ppp_echo_request2: "enable"
ppp_echo_request3: "enable"
priority: "1"
redial: "none"
reset: "0"
status: "enable"
traffic_check: "enable"
username1: ""
username2: ""
username3: ""
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:
.. raw:: html
- 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.