fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_dhcpserver module – Configure DHCP servers.
Note
This module is part of the fortinet.fortimanager collection (version 2.5.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install fortinet.fortimanager
.
To use it in a playbook, specify: fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_dhcpserver
.
New in fortinet.fortimanager 2.0.0
Synopsis
This module is able to configure a FortiManager device.
Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
Parameter |
Comments |
---|---|
The token to access FortiManager without using username and password. |
|
The parameter (adom) in requested url. |
|
Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. Choices:
|
|
The parameter (dynamic_mapping) in requested url. |
|
Enable/Disable logging for task. Choices:
|
|
Authenticate Ansible client with forticloud API access token. |
|
The top level parameters set. |
|
Deprecated, please rename it to auto_configuration. Choices:
|
|
Deprecated, please rename it to auto_managed_status. Choices:
|
|
Deprecated, please rename it to conflicted_ip_timeout. |
|
Deprecated, please rename it to ddns_auth. Choices:
|
|
(list or str) Deprecated, please rename it to ddns_key. |
|
Deprecated, please rename it to ddns_keyname. |
|
Deprecated, please rename it to ddns_server_ip. |
|
Deprecated, please rename it to ddns_ttl. |
|
Deprecated, please rename it to ddns_update. Choices:
|
|
Deprecated, please rename it to ddns_update_override. Choices:
|
|
Deprecated, please rename it to ddns_zone. |
|
Deprecated, please rename it to default_gateway. |
|
Deprecated, please rename it to dhcp_settings_from_fortiipam. Choices:
|
|
Deprecated, please rename it to dns_server1. |
|
Deprecated, please rename it to dns_server2. |
|
Deprecated, please rename it to dns_server3. |
|
Deprecated, please rename it to dns_server4. |
|
Deprecated, please rename it to dns_service. Choices:
|
|
No description. |
|
No description. Choices:
|
|
Deprecated, please rename it to exclude_range. |
|
Deprecated, please rename it to end_ip. |
|
No description. |
|
Deprecated, please rename it to lease_time. Lease time in seconds, 0 means default lease time. |
|
Deprecated, please rename it to start_ip. |
|
Deprecated, please rename it to uci_match. Enable/disable user class identifier Choices:
|
|
(list) Deprecated, please rename it to uci_string. |
|
Deprecated, please rename it to vci_match. Enable/disable vendor class identifier Choices:
|
|
(list) Deprecated, please rename it to vci_string. |
|
No description. |
|
Deprecated, please rename it to forticlient_on_net_status. Choices:
|
|
No description. |
|
No description. |
|
Deprecated, please rename it to ip_mode. Choices:
|
|
Deprecated, please rename it to ip_range. |
|
Deprecated, please rename it to end_ip. |
|
No description. |
|
Deprecated, please rename it to lease_time. Lease time in seconds, 0 means default lease time. |
|
Deprecated, please rename it to start_ip. |
|
Deprecated, please rename it to uci_match. Enable/disable user class identifier Choices:
|
|
(list) Deprecated, please rename it to uci_string. |
|
Deprecated, please rename it to vci_match. Enable/disable vendor class identifier Choices:
|
|
(list) Deprecated, please rename it to vci_string. |
|
Deprecated, please rename it to ipsec_lease_hold. |
|
Deprecated, please rename it to lease_time. |
|
Deprecated, please rename it to mac_acl_default_action. Choices:
|
|
No description. |
|
Deprecated, please rename it to next_server. |
|
Deprecated, please rename it to ntp_server1. |
|
Deprecated, please rename it to ntp_server2. |
|
Deprecated, please rename it to ntp_server3. |
|
Deprecated, please rename it to ntp_service. Choices:
|
|
(list) No description. |
|
(list) No description. |
|
(list) No description. |
|
No description. |
|
No description. |
|
No description. |
|
No description. |
|
No description. |
|
No description. |
|
(list) No description. |
|
No description. Choices:
|
|
Deprecated, please rename it to uci_match. Enable/disable user class identifier Choices:
|
|
(list) Deprecated, please rename it to uci_string. |
|
No description. |
|
Deprecated, please rename it to vci_match. Enable/disable vendor class identifier Choices:
|
|
(list) Deprecated, please rename it to vci_string. |
|
Deprecated, please rename it to relay_agent. Relay agent IP. |
|
Deprecated, please rename it to reserved_address. |
|
No description. Choices:
|
|
Deprecated, please rename it to circuit_id. |
|
Deprecated, please rename it to circuit_id_type. Choices:
|
|
No description. |
|
No description. |
|
No description. |
|
No description. |
|
Deprecated, please rename it to remote_id. |
|
Deprecated, please rename it to remote_id_type. Choices:
|
|
No description. Choices:
|
|
Deprecated, please rename it to server_type. Choices:
|
|
Deprecated, please rename it to shared_subnet. Enable/disable shared subnet. Choices:
|
|
No description. Choices:
|
|
(list) Deprecated, please rename it to tftp_server. |
|
No description. Choices:
|
|
Deprecated, please rename it to timezone_option. Choices:
|
|
Deprecated, please rename it to vci_match. Choices:
|
|
(list) Deprecated, please rename it to vci_string. |
|
Deprecated, please rename it to wifi_ac_service. Choices:
|
|
Deprecated, please rename it to wifi_ac1. |
|
Deprecated, please rename it to wifi_ac2. |
|
Deprecated, please rename it to wifi_ac3. |
|
Deprecated, please rename it to wins_server1. |
|
Deprecated, please rename it to wins_server2. |
|
The overridden method for the underlying Json RPC request. Choices:
|
|
The rc codes list with which the conditions to fail will be overriden. |
|
The rc codes list with which the conditions to succeed will be overriden. |
|
The parameter (vlan) in requested url. |
|
The adom to lock for FortiManager running in workspace mode, the value can be global and others including root. |
|
The maximum time in seconds to wait for other user to release the workspace lock. Default: |
Notes
Note
Starting in version 2.4.0, all input arguments are named using the underscore naming convention (snake_case). Please change the arguments such as “var-name” to “var_name”. Old argument names are still available yet you will receive deprecation warnings. You can ignore this warning by setting deprecation_warnings=False in ansible.cfg.
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.
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
- name: Example playbook (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Configure DHCP servers.
fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping_dhcpserver:
# bypass_validation: false
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
adom: <your own value>
vlan: <your own value>
dynamic_mapping: <your own value>
fsp_vlan_dynamicmapping_dhcpserver:
auto_configuration: <value in [disable, enable]>
conflicted_ip_timeout: <integer>
ddns_auth: <value in [disable, tsig]>
ddns_key: <list or string>
ddns_keyname: <string>
ddns_server_ip: <string>
ddns_ttl: <integer>
ddns_update: <value in [disable, enable]>
ddns_update_override: <value in [disable, enable]>
ddns_zone: <string>
default_gateway: <string>
dns_server1: <string>
dns_server2: <string>
dns_server3: <string>
dns_service: <value in [default, specify, local]>
domain: <string>
enable: <value in [disable, enable]>
exclude_range:
-
end_ip: <string>
id: <integer>
start_ip: <string>
vci_match: <value in [disable, enable]>
vci_string: <list or string>
lease_time: <integer>
uci_match: <value in [disable, enable]>
uci_string: <list or string>
filename: <string>
forticlient_on_net_status: <value in [disable, enable]>
id: <integer>
interface: <string>
ip_mode: <value in [range, usrgrp]>
ip_range:
-
end_ip: <string>
id: <integer>
start_ip: <string>
vci_match: <value in [disable, enable]>
vci_string: <list or string>
lease_time: <integer>
uci_match: <value in [disable, enable]>
uci_string: <list or string>
ipsec_lease_hold: <integer>
lease_time: <integer>
mac_acl_default_action: <value in [assign, block]>
netmask: <string>
next_server: <string>
ntp_server1: <string>
ntp_server2: <string>
ntp_server3: <string>
ntp_service: <value in [default, specify, local]>
option1: <list or string>
option2: <list or string>
option3: <list or string>
option4: <string>
option5: <string>
option6: <string>
options:
-
code: <integer>
id: <integer>
ip: <list or string>
type: <value in [hex, string, ip, ...]>
value: <string>
vci_match: <value in [disable, enable]>
vci_string: <list or string>
uci_match: <value in [disable, enable]>
uci_string: <list or string>
reserved_address:
-
action: <value in [assign, block, reserved]>
circuit_id: <string>
circuit_id_type: <value in [hex, string]>
description: <string>
id: <integer>
ip: <string>
mac: <string>
remote_id: <string>
remote_id_type: <value in [hex, string]>
type: <value in [mac, option82]>
server_type: <value in [regular, ipsec]>
status: <value in [disable, enable]>
tftp_server: <list or string>
timezone: <value in [00, 01, 02, ...]>
timezone_option: <value in [disable, default, specify]>
vci_match: <value in [disable, enable]>
vci_string: <list or string>
wifi_ac1: <string>
wifi_ac2: <string>
wifi_ac3: <string>
wins_server1: <string>
wins_server2: <string>
dns_server4: <string>
wifi_ac_service: <value in [specify, local]>
auto_managed_status: <value in [disable, enable]>
dhcp_settings_from_fortiipam: <value in [disable, enable]>
relay_agent: <string>
shared_subnet: <value in [disable, enable]>
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The result of the request. Returned: always |
|
The full url requested. Returned: always Sample: |
|
The status of api request. Returned: always Sample: |
|
The api response. Returned: always |
|
The descriptive message of the api response. Returned: always Sample: |
|
The information of the target system. Returned: always |
|
The status the request. Returned: always Sample: |
|
Warning if the parameters used in the playbook are not supported by the current FortiManager version. Returned: complex |