fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping module – Fsp vlan dynamic mapping
Note
This module is part of the fortinet.fortimanager collection (version 2.8.2).
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
.
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:
|
|
Enable/Disable logging for task. Choices:
|
|
Authenticate Ansible client with forticloud API access token. |
|
The top level parameters set. |
|
Dhcp status. Choices:
|
|
Scope. |
|
Name. |
|
Vdom. |
|
Dhcp server. |
|
Enable/disable auto configuration. Choices:
|
|
Enable/disable use of this DHCP server once this interface has been assigned an IP address from FortiIPAM. Choices:
|
|
Time in seconds to wait after a conflicted IP address is removed from the DHCP range before it can be reused. |
|
DDNS authentication mode. Choices:
|
|
(list or str) DDNS update key |
|
DDNS update key name. |
|
DDNS server IP. |
|
TTL. |
|
Enable/disable DDNS update for DHCP. Choices:
|
|
Enable/disable DDNS update override for DHCP. Choices:
|
|
Zone of your domain name |
|
Default gateway IP address assigned by the DHCP server. |
|
Enable/disable populating of DHCP server settings from FortiIPAM. Choices:
|
|
DNS server 1. |
|
DNS server 2. |
|
DNS server 3. |
|
DNS server 4. |
|
Options for assigning DNS servers to DHCP clients. Choices:
|
|
Domain name suffix for the IP addresses that the DHCP server assigns to clients. |
|
Enable. Choices:
|
|
Exclude range. |
|
End of IP range. |
|
ID. |
|
Lease time in seconds, 0 means default lease time. |
|
Start of IP range. |
|
Enable/disable user class identifier Choices:
|
|
(list) One or more UCI strings in quotes separated by spaces. |
|
Enable/disable vendor class identifier Choices:
|
|
(list) One or more VCI strings in quotes separated by spaces. |
|
Name of the boot file on the TFTP server. |
|
Enable/disable FortiClient-On-Net service for this DHCP server. Choices:
|
|
ID. |
|
Method used to assign client IP. Choices:
|
|
Ip range. |
|
End of IP range. |
|
ID. |
|
Lease time in seconds, 0 means default lease time. |
|
Start of IP range. |
|
Enable/disable user class identifier Choices:
|
|
(list) One or more UCI strings in quotes separated by spaces. |
|
Enable/disable vendor class identifier Choices:
|
|
(list) One or more VCI strings in quotes separated by spaces. |
|
DHCP over IPsec leases expire this many seconds after tunnel down |
|
Lease time in seconds, 0 means unlimited. |
|
MAC access control default action Choices:
|
|
Netmask assigned by the DHCP server. |
|
IP address of a server |
|
NTP server 1. |
|
NTP server 2. |
|
NTP server 3. |
|
Options for assigning Network Time Protocol Choices:
|
|
(list) Option1. |
|
(list) Option2. |
|
(list) Option3. |
|
Option4. |
|
Option5. |
|
Option6. |
|
Options. |
|
DHCP option code. |
|
ID. |
|
(list) DHCP option IPs. |
|
DHCP option type. Choices:
|
|
Enable/disable user class identifier Choices:
|
|
(list) One or more UCI strings in quotes separated by spaces. |
|
DHCP option value. |
|
Enable/disable vendor class identifier Choices:
|
|
(list) One or more VCI strings in quotes separated by spaces. |
|
Relay agent IP. |
|
Reserved address. |
|
Options for the DHCP server to configure the client with the reserved MAC address. Choices:
|
|
Option 82 circuit-ID of the client that will get the reserved IP address. |
|
DHCP option type. Choices:
|
|
Description. |
|
ID. |
|
IP address to be reserved for the MAC address. |
|
MAC address of the client that will get the reserved IP address. |
|
Option 82 remote-ID of the client that will get the reserved IP address. |
|
DHCP option type. Choices:
|
|
DHCP reserved-address type. Choices:
|
|
DHCP server can be a normal DHCP server or an IPsec DHCP server. Choices:
|
|
Enable/disable shared subnet. Choices:
|
|
Enable/disable this DHCP configuration. Choices:
|
|
(list) One or more hostnames or IP addresses of the TFTP servers in quotes separated by spaces. |
|
Select the time zone to be assigned to DHCP clients. Choices:
|
|
Options for the DHCP server to set the clients time zone. Choices:
|
|
Enable/disable vendor class identifier Choices:
|
|
(list) One or more VCI strings in quotes separated by spaces. |
|
WiFi Access Controller 1 IP address |
|
WiFi Access Controller 2 IP address |
|
WiFi Access Controller 3 IP address |
|
Options for assigning WiFi Access Controllers to DHCP clients Choices:
|
|
WINS server 1. |
|
WINS server 2. |
|
Interface. |
|
Dhcp relay agent option. Choices:
|
|
Dhcp relay interface select method. Choices:
|
|
(list) Dhcp relay ip. |
|
Dhcp relay service. Choices:
|
|
Dhcp relay type. Choices:
|
|
Ip. |
|
Ipv6. |
|
Enable/disable address auto config. Choices:
|
|
Cli conn6 status. |
|
Dhcp6 client options. Choices:
|
|
Enable/disable DHCPv6 information request. Choices:
|
|
Enable/disable DHCPv6 prefix delegation. Choices:
|
|
DHCPv6 prefix that will be used as a hint to the upstream DHCPv6 server. |
|
DHCPv6 prefix hint preferred life time |
|
DHCPv6 prefix hint valid life time |
|
DHCP6 relay interface ID. |
|
DHCPv6 relay IP address. |
|
Enable/disable DHCPv6 relay. Choices:
|
|
Enable/disable use of address on this interface as the source address of the relay message. Choices:
|
|
IPv6 address used by the DHCP6 relay as its source IP. |
|
DHCPv6 relay type. Choices:
|
|
Enable/disable sending of ICMPv6 redirects. Choices:
|
|
IPv6 interface identifier. |
|
Primary IPv6 address prefix, syntax |
|
Allow management access to the interface. Choices:
|
|
Default life |
|
IAID of obtained delegated-prefix from the upstream interface. |
|
Ip6 delegated prefix list. |
|
Enable/disable the autonomous flag. Choices:
|
|
IAID of obtained delegated-prefix from the upstream interface. |
|
Enable/disable the onlink flag. Choices:
|
|
Prefix ID. |
|
(list) Recursive DNS server option. |
|
Recursive DNS service option. Choices:
|
|
Add subnet ID to routing prefix. |
|
Name of the interface that provides delegated information. |
|
Enable/disable using the DNS server acquired by DHCP. Choices:
|
|
Ip6 extra addr. |
|
IPv6 address prefix. |
|
Hop limit |
|
IPv6 link MTU. |
|
Enable/disable the managed flag. Choices:
|
|
IPv6 maximum interval |
|
IPv6 minimum interval |
|
Addressing mode Choices:
|
|
Enable/disable the other IPv6 flag. Choices:
|
|
Ip6 prefix list. |
|
Enable/disable the autonomous flag. Choices:
|
|
(list) DNS search list option. |
|
Enable/disable the onlink flag. Choices:
|
|
Preferred life time |
|
IPv6 prefix. |
|
(list) Recursive DNS server option. |
|
Valid life time |
|
Assigning a prefix from DHCP or RA. Choices:
|
|
IPv6 reachable time |
|
IPv6 retransmit time |
|
Enable/disable sending advertisements about the interface. Choices:
|
|
Subnet to routing prefix, syntax |
|
Interface name providing delegated information. |
|
Neighbor discovery certificate. |
|
Neighbor discovery CGA modifier. |
|
Neighbor discovery mode. Choices:
|
|
Neighbor discovery security level |
|
Neighbor discovery timestamp delta value |
|
Neighbor discovery timestamp fuzz factor |
|
Enable/disable sending link MTU in RA packet. Choices:
|
|
Enable/disable unique auto config address. Choices:
|
|
Link-local IPv6 address of virtual router. |
|
Vrrp6. |
|
Enable/disable accept mode. Choices:
|
|
Advertisement interval |
|
Enable/disable ignoring of default route when checking destination. Choices:
|
|
Enable/disable preempt mode. Choices:
|
|
Priority of the virtual router |
|
Startup time |
|
Enable/disable VRRP. Choices:
|
|
Monitor the route to this destination. |
|
Priority of the virtual router when the virtual router destination becomes unreachable |
|
VRRP group ID |
|
Virtual router identifier |
|
IPv6 address of the virtual router. |
|
Enable/disable virtual MAC for VRRP. Choices:
|
|
Secondary IP. Choices:
|
|
Secondaryip. |
|
Management access settings for the secondary IP address. Choices:
|
|
Protocols used to detect the server. Choices:
|
|
Gateways ping server for this IP. |
|
Enable/disable detect gateway alive for first. Choices:
|
|
HA election priority for the PING server. |
|
ID. |
|
Secondary IP address of the interface. |
|
Ping serv status. |
|
DHCP relay IP address. |
|
Seq. |
|
Vlanid. |
|
Vrrp. |
|
Enable/disable accept mode. Choices:
|
|
Advertisement interval |
|
Enable/disable ignoring of default route when checking destination. Choices:
|
|
Enable/disable preempt mode. Choices:
|
|
Priority of the virtual router |
|
Proxy arp. |
|
ID. |
|
Set IP addresses of proxy ARP. |
|
Startup time |
|
Enable/disable this VRRP configuration. Choices:
|
|
VRRP version. Choices:
|
|
(list) Monitor the route to this destination. |
|
Priority of the virtual router when the virtual router destination becomes unreachable |
|
VRRP group ID |
|
Virtual router identifier |
|
IP address of the virtual router. |
|
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 directive to create, update or delete an object. Choices:
|
|
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.
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
- 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: Fsp vlan dynamic mapping
fortinet.fortimanager.fmgr_fsp_vlan_dynamicmapping:
# 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>
state: present # <value in [present, absent]>
fsp_vlan_dynamicmapping:
_dhcp_status: <value in [disable, enable]>
_scope:
-
name: <string>
vdom: <string>
dhcp_server:
auto_configuration: <value in [disable, enable]>
auto_managed_status: <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>
dhcp_settings_from_fortiipam: <value in [disable, enable]>
dns_server1: <string>
dns_server2: <string>
dns_server3: <string>
dns_server4: <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>
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_ac_service: <value in [specify, local]>
wifi_ac1: <string>
wifi_ac2: <string>
wifi_ac3: <string>
wins_server1: <string>
wins_server2: <string>
relay_agent: <string>
shared_subnet: <value in [disable, enable]>
interface:
dhcp_relay_agent_option: <value in [disable, enable]>
dhcp_relay_ip: <list or string>
dhcp_relay_service: <value in [disable, enable]>
dhcp_relay_type: <value in [regular, ipsec]>
ip: <string>
ipv6:
autoconf: <value in [disable, enable]>
dhcp6_client_options:
- "rapid"
- "iapd"
- "iana"
- "dns"
- "dnsname"
dhcp6_information_request: <value in [disable, enable]>
dhcp6_prefix_delegation: <value in [disable, enable]>
dhcp6_prefix_hint: <string>
dhcp6_prefix_hint_plt: <integer>
dhcp6_prefix_hint_vlt: <integer>
dhcp6_relay_ip: <string>
dhcp6_relay_service: <value in [disable, enable]>
dhcp6_relay_type: <value in [regular]>
icmp6_send_redirect: <value in [disable, enable]>
interface_identifier: <string>
ip6_address: <string>
ip6_allowaccess:
- "https"
- "ping"
- "ssh"
- "snmp"
- "http"
- "telnet"
- "fgfm"
- "capwap"
- "fabric"
ip6_default_life: <integer>
ip6_delegated_prefix_list:
-
autonomous_flag: <value in [disable, enable]>
onlink_flag: <value in [disable, enable]>
prefix_id: <integer>
rdnss: <list or string>
rdnss_service: <value in [delegated, default, specify]>
subnet: <string>
upstream_interface: <string>
delegated_prefix_iaid: <integer>
ip6_dns_server_override: <value in [disable, enable]>
ip6_extra_addr:
-
prefix: <string>
ip6_hop_limit: <integer>
ip6_link_mtu: <integer>
ip6_manage_flag: <value in [disable, enable]>
ip6_max_interval: <integer>
ip6_min_interval: <integer>
ip6_mode: <value in [static, dhcp, pppoe, ...]>
ip6_other_flag: <value in [disable, enable]>
ip6_prefix_list:
-
autonomous_flag: <value in [disable, enable]>
dnssl: <list or string>
onlink_flag: <value in [disable, enable]>
preferred_life_time: <integer>
prefix: <string>
rdnss: <list or string>
valid_life_time: <integer>
ip6_reachable_time: <integer>
ip6_retrans_time: <integer>
ip6_send_adv: <value in [disable, enable]>
ip6_subnet: <string>
ip6_upstream_interface: <string>
nd_cert: <string>
nd_cga_modifier: <string>
nd_mode: <value in [basic, SEND-compatible]>
nd_security_level: <integer>
nd_timestamp_delta: <integer>
nd_timestamp_fuzz: <integer>
unique_autoconf_addr: <value in [disable, enable]>
vrip6_link_local: <string>
vrrp_virtual_mac6: <value in [disable, enable]>
vrrp6:
-
accept_mode: <value in [disable, enable]>
adv_interval: <integer>
preempt: <value in [disable, enable]>
priority: <integer>
start_time: <integer>
status: <value in [disable, enable]>
vrdst6: <string>
vrgrp: <integer>
vrid: <integer>
vrip6: <string>
ignore_default_route: <value in [disable, enable]>
vrdst_priority: <integer>
cli_conn6_status: <integer>
ip6_prefix_mode: <value in [dhcp6, ra]>
ra_send_mtu: <value in [disable, enable]>
ip6_delegated_prefix_iaid: <integer>
dhcp6_relay_source_interface: <value in [disable, enable]>
dhcp6_relay_interface_id: <string>
dhcp6_relay_source_ip: <string>
secondary_IP: <value in [disable, enable]>
secondaryip:
-
allowaccess:
- "https"
- "ping"
- "ssh"
- "snmp"
- "http"
- "telnet"
- "fgfm"
- "auto-ipsec"
- "radius-acct"
- "probe-response"
- "capwap"
- "dnp"
- "ftm"
- "fabric"
- "speed-test"
- "icond"
- "scim"
detectprotocol:
- "ping"
- "tcp-echo"
- "udp-echo"
detectserver: <string>
gwdetect: <value in [disable, enable]>
ha_priority: <integer>
id: <integer>
ip: <string>
ping_serv_status: <integer>
seq: <integer>
secip_relay_ip: <string>
vlanid: <integer>
dhcp_relay_interface_select_method: <value in [auto, sdwan, specify]>
vrrp:
-
accept_mode: <value in [disable, enable]>
adv_interval: <integer>
ignore_default_route: <value in [disable, enable]>
preempt: <value in [disable, enable]>
priority: <integer>
proxy_arp:
-
id: <integer>
ip: <string>
start_time: <integer>
status: <value in [disable, enable]>
version: <value in [2, 3]>
vrdst: <list or string>
vrdst_priority: <integer>
vrgrp: <integer>
vrid: <integer>
vrip: <string>
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 |