:source: fmgd_system_modem.py
:orphan:
.. _fmgd_system_modem:
fmgd_system_modem -- Configure MODEM.
+++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiManager device.
- Examples include all parameters and values need to be adjusted to data sources before usage.
- Tested with FortiManager v7.x.
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible-core>=2.16.0
FortiManager Version Compatibility
----------------------------------
.. raw:: html
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Parameters
----------
.. raw:: html
- access_token -The token to access FortiManager without using username and password. type: str required: false
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
- device - The parameter in requested url type: str required: true
- vdom - The parameter in requested url type: str required: true
- system_modem - Configure MODEM. type: dict
- altmode Enable/disable altmode for installations using ppp in china. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- authtype1 Allowed authentication types for isp 1. type: list choices: [pap, chap, mschapv2, mschap]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- authtype2 Allowed authentication types for isp 2. type: list choices: [pap, chap, mschapv2, mschap]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- authtype3 Allowed authentication types for isp 3. type: list choices: [pap, chap, mschapv2, mschap]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- auto_dial (Alias name: auto-dial) Enable/disable auto-dial after a reboot or disconnection. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- connect_timeout (Alias name: connect-timeout) Connection completion timeout (30 - 255 sec, default = 90). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dial_cmd1 (Alias name: dial-cmd1) Dial command (this is often an atd or atdt command). type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dial_cmd2 (Alias name: dial-cmd2) Dial command (this is often an atd or atdt command). type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dial_cmd3 (Alias name: dial-cmd3) Dial command (this is often an atd or atdt command). type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dial_on_demand (Alias name: dial-on-demand) Enable/disable to dial the modem when packets are routed to the modem interface. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- distance Distance of learned routes (1 - 255, default = 1). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dont_send_CR1 (Alias name: dont-send-CR1) Do not send cr when connected (isp1). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dont_send_CR2 (Alias name: dont-send-CR2) Do not send cr when connected (isp2). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- dont_send_CR3 (Alias name: dont-send-CR3) Do not send cr when connected (isp3). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- extra_init1 (Alias name: extra-init1) Extra initialization string to isp 1. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- extra_init2 (Alias name: extra-init2) Extra initialization string to isp 2. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- extra_init3 (Alias name: extra-init3) Extra initialization string to isp 3. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- holddown_timer (Alias name: holddown-timer) Hold down timer in seconds (1 - 60 sec). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- idle_timer (Alias name: idle-timer) Modem connection idle time (1 - 9999 min, default = 5). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- interface Name of redundant interface. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- lockdown_lac (Alias name: lockdown-lac) Allow connection only to the specified location area code (lac). type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- mode Set modem operation mode to redundant or standalone. type: str choices: [standalone, redundant]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- network_init (Alias name: network-init) At command to set the network name/type (at+cops=,[,[,]]). type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- passwd1 Password to access the specified dialup account. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- passwd2 Password to access the specified dialup account. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- passwd3 Password to access the specified dialup account. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- peer_modem1 (Alias name: peer-modem1) Specify peer modem type for phone1. type: str choices: [generic, actiontec, ascend_TNT]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- peer_modem2 (Alias name: peer-modem2) Specify peer modem type for phone2. type: str choices: [generic, actiontec, ascend_TNT]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- peer_modem3 (Alias name: peer-modem3) Specify peer modem type for phone3. type: str choices: [generic, actiontec, ascend_TNT]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> 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: v7.2.6 -> v7.2.12, v7.4.3 -> 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: v7.2.6 -> v7.2.12, v7.4.3 -> 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: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- pin_init (Alias name: pin-init) At command to set the pin (at+pin=). type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ppp_echo_request1 (Alias name: ppp-echo-request1) Enable/disable ppp echo-request to isp 1. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ppp_echo_request2 (Alias name: ppp-echo-request2) Enable/disable ppp echo-request to isp 2. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ppp_echo_request3 (Alias name: ppp-echo-request3) Enable/disable ppp echo-request to isp 3. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- priority Priority of learned routes (1 - 65535, default = 1). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> 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: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- reset Number of dial attempts before resetting modem (0 = never reset). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- status Enable/disable modem support (equivalent to bringing an interface up or down). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- username1 User name to access the specified dialup account. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- username2 User name to access the specified dialup account. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- username3 User name to access the specified dialup account. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- wireless_port (Alias name: wireless-port) Enter wireless port number: 0 for default, 1 for first port, and so on (0 - 4294967295). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Notes
-----
.. note::
- Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
- To create or update an object, use state: present directive.
- To delete an object, use state: absent directive
- Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples
--------
.. code-block:: yaml+jinja
- name: Example playbook (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
gather_facts: false
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Configure MODEM.
fortinet.fmgdevice.fmgd_system_modem:
# bypass_validation: false
# workspace_locking_adom:
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device:
vdom:
system_modem:
# altmode:
# authtype1:
# - "pap"
# - "chap"
# - "mschapv2"
# - "mschap"
# authtype2:
# - "pap"
# - "chap"
# - "mschapv2"
# - "mschap"
# authtype3:
# - "pap"
# - "chap"
# - "mschapv2"
# - "mschap"
# auto_dial:
# connect_timeout:
# dial_cmd1:
# dial_cmd2:
# dial_cmd3:
# dial_on_demand:
# distance:
# dont_send_CR1:
# dont_send_CR2:
# dont_send_CR3:
# extra_init1:
# extra_init2:
# extra_init3:
# holddown_timer:
# idle_timer:
# interface:
# lockdown_lac:
# mode:
# network_init:
# passwd1:
# passwd2:
# passwd3:
# peer_modem1:
# peer_modem2:
# peer_modem3:
# phone1:
# phone2:
# phone3:
# pin_init:
# ppp_echo_request1:
# ppp_echo_request2:
# ppp_echo_request3:
# priority:
# redial:
# reset:
# status:
# username1:
# username2:
# username3:
# wireless_port:
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
- meta - The result of the request.returned: always type: dict
- request_url - The full url requested. returned: always type: str sample: /sys/login/user
- response_code - The status of api request. returned: always type: int sample: 0
- response_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Xinwei Du (@dux-fortinet)
- Xing Li (@lix-fortinet)
- Jie Xue (@JieX19)
- Link Zheng (@chillancezen)
- Frank Shen (@fshen01)
- Hongbin Lu (@fgtdev-hblu)