:source: fortios_firewall_address.py
:orphan:
.. fortios_firewall_address:
fortios_firewall_address -- Configure IPv4 addresses 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 firewall feature and address 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.16
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
- state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
- firewall_address - Configure IPv4 addresses. type: dict
more...
| Supported Version Ranges |
| firewall_address |
v6.0.0 -> 7.6.6 |
- agent_id - Telemetry agent id. Source telemetry-controller.agent.agent-id. type: str
more...
|
Supported Version Ranges |
| agent_id |
v7.6.4 -> 7.6.6 |
- allow_routing - Enable/disable use of this address in routing configurations. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| allow_routing |
v6.0.0 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- associated_interface - Network interface associated with address. Source system.interface.name system.zone.name. type: str
more...
|
Supported Version Ranges |
| associated_interface |
v6.0.0 -> 7.6.6 |
- cache_ttl - Defines the minimal TTL of individual IP addresses in FQDN cache measured in seconds. type: int
more...
|
Supported Version Ranges |
| cache_ttl |
v6.0.0 -> 7.6.6 |
- clearpass_spt - SPT (System Posture Token) value. type: str choices: unknown, healthy, quarantine, checkup, transient, infected
more...
|
Supported Version Ranges |
| clearpass_spt |
v6.2.0 -> 7.6.6 |
| [unknown] |
v6.2.0 -> 7.6.6 |
| [healthy] |
v6.2.0 -> 7.6.6 |
| [quarantine] |
v6.2.0 -> 7.6.6 |
| [checkup] |
v6.2.0 -> 7.6.6 |
| [transient] |
v6.2.0 -> 7.6.6 |
| [infected] |
v6.2.0 -> 7.6.6 |
- color - Color of icon on the GUI. type: int
more...
|
Supported Version Ranges |
| color |
v6.0.0 -> 7.6.6 |
- comment - Comment. type: str
more...
|
Supported Version Ranges |
| comment |
v6.0.0 -> 7.6.6 |
- country - IP addresses associated to a specific country. type: str
more...
|
Supported Version Ranges |
| country |
v6.0.0 -> 7.6.6 |
- end_ip - Final IP address (inclusive) in the range for the address. type: str
more...
|
Supported Version Ranges |
| end_ip |
v6.0.0 -> 7.6.6 |
- end_mac - Last MAC address in the range. type: str
more...
|
Supported Version Ranges |
| end_mac |
v6.2.0 -> v6.4.4 |
- epg_name - Endpoint group name. type: str
more...
|
Supported Version Ranges |
| epg_name |
v6.0.0 -> 7.6.6 |
- fabric_object - Security Fabric global object setting. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| fabric_object |
v6.4.4 -> 7.6.6 |
| [enable] |
v6.4.4 -> 7.6.6 |
| [disable] |
v6.4.4 -> 7.6.6 |
- filter - Match criteria filter. type: str
more...
|
Supported Version Ranges |
| filter |
v6.0.0 -> 7.6.6 |
- fqdn - Fully Qualified Domain Name address. type: str
more...
|
Supported Version Ranges |
| fqdn |
v6.0.0 -> 7.6.6 |
- fsso_group - FSSO group(s). type: list member_path: fsso_group:name
more...
| Supported Version Ranges |
| fsso_group |
v6.2.0 -> 7.6.6 |
- name - FSSO group name. Source user.adgrp.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.2.0 -> 7.6.6 |
- hw_model - Dynamic address matching hardware model. type: str
more...
|
Supported Version Ranges |
| hw_model |
v7.4.0 -> 7.6.6 |
- hw_vendor - Dynamic address matching hardware vendor. type: str
more...
|
Supported Version Ranges |
| hw_vendor |
v7.4.0 -> 7.6.6 |
- interface - Name of interface whose IP address is to be used. Source system.interface.name. type: str
more...
|
Supported Version Ranges |
| interface |
v6.2.0 -> 7.6.6 |
- list - IP address list. type: list member_path: list:ip
more...
| Supported Version Ranges |
| list |
v6.0.0 -> 7.6.6 |
- ip - IP. type: str required: true
more...
|
Supported Version Ranges |
| ip |
v6.0.0 -> 7.6.6 |
- net_id - Network ID. type: str
more...
|
Supported Version Ranges |
| net_id |
v6.2.3 -> v6.2.3 |
- obj_id - Object ID. type: str
more...
|
Supported Version Ranges |
| obj_id |
v6.2.3 -> v6.2.3 |
- macaddr - Multiple MAC address ranges. type: list member_path: macaddr:macaddr
more...
| Supported Version Ranges |
| macaddr |
v7.0.0 -> 7.6.6 |
- macaddr - MAC address ranges [-] separated by space. type: str required: true
more...
|
Supported Version Ranges |
| macaddr |
v7.0.0 -> 7.6.6 |
- name - Address name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- node_ip_only - Enable/disable collection of node addresses only in Kubernetes. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| node_ip_only |
v7.0.0 -> 7.6.6 |
| [enable] |
v7.0.0 -> 7.6.6 |
| [disable] |
v7.0.0 -> 7.6.6 |
- obj_id - Object ID for NSX. type: str
more...
|
Supported Version Ranges |
| obj_id |
v6.0.0 -> 7.6.6 |
- obj_tag - Tag of dynamic address object. type: str
more...
|
Supported Version Ranges |
| obj_tag |
v6.4.0 -> v6.4.0 |
v6.4.4 -> 7.6.6 |
- obj_type - Object type. type: str choices: ip, mac
more...
|
Supported Version Ranges |
| obj_type |
v6.4.0 -> v6.4.0 |
v6.4.4 -> 7.6.6 |
| [ip] |
v6.4.0 -> v6.4.0 |
| [mac] |
v6.4.0 -> v6.4.0 |
- organization - Organization domain name (Syntax: organization/domain). type: str
more...
|
Supported Version Ranges |
| organization |
v6.0.0 -> 7.6.6 |
- os - Dynamic address matching operating system. type: str
more...
|
Supported Version Ranges |
| os |
v7.4.0 -> 7.6.6 |
- passive_fqdn_learning - Enable/disable passive learning of FQDNs. When enabled, the FortiGate learns, trusts, and saves FQDNs from endpoint DNS queries . type: str choices: disable, enable
more...
|
Supported Version Ranges |
| passive_fqdn_learning |
v7.6.5 -> 7.6.6 |
| [disable] |
v7.6.5 -> 7.6.6 |
| [enable] |
v7.6.5 -> 7.6.6 |
- policy_group - Policy group name. type: str
more...
|
Supported Version Ranges |
| policy_group |
v6.0.0 -> 7.6.6 |
- route_tag - route-tag address. type: int
more...
|
Supported Version Ranges |
| route_tag |
v7.4.0 -> 7.6.6 |
- sdn - SDN. Source system.sdn-connector.name. type: str
more...
|
Supported Version Ranges |
| sdn |
v6.0.0 -> 7.6.6 |
- sdn_addr_type - Type of addresses to collect. type: str choices: private, public, all
more...
|
Supported Version Ranges |
| sdn_addr_type |
v6.2.0 -> 7.6.6 |
| [private] |
v6.2.0 -> 7.6.6 |
| [public] |
v6.2.0 -> 7.6.6 |
| [all] |
v6.2.0 -> 7.6.6 |
- sdn_tag - SDN Tag. type: str
more...
|
Supported Version Ranges |
| sdn_tag |
v6.0.0 -> 7.6.6 |
- sso_attribute_value - RADIUS attributes value. type: list member_path: sso_attribute_value:name
more...
| Supported Version Ranges |
| sso_attribute_value |
v7.6.1 -> 7.6.6 |
- name - RADIUS attribute value. type: str required: true
more...
|
Supported Version Ranges |
| name |
v7.6.1 -> 7.6.6 |
- start_ip - First IP address (inclusive) in the range for the address. type: str
more...
|
Supported Version Ranges |
| start_ip |
v6.0.0 -> 7.6.6 |
- start_mac - First MAC address in the range. type: str
more...
|
Supported Version Ranges |
| start_mac |
v6.2.0 -> v6.4.4 |
- sub_type - Sub-type of address. type: str choices: sdn, clearpass-spt, fsso, rsso, ems-tag, fortivoice-tag, fortinac-tag, swc-tag, device-identification, external-resource, telemetry, obsolete, fortipolicy-tag
more...
|
Supported Version Ranges |
| sub_type |
v6.2.0 -> 7.6.6 |
| [sdn] |
v6.2.0 -> 7.6.6 |
| [clearpass-spt] |
v6.2.0 -> 7.6.6 |
| [fsso] |
v6.2.0 -> 7.6.6 |
| [rsso] |
v7.6.1 -> 7.6.6 |
| [ems-tag] |
v6.4.0 -> 7.6.6 |
| [fortivoice-tag] |
v7.0.4 -> 7.6.6 |
| [fortinac-tag] |
v7.0.4 -> 7.6.6 |
| [swc-tag] |
v7.0.1 -> 7.6.6 |
| [device-identification] |
v7.4.0 -> 7.6.6 |
| [external-resource] |
v7.6.1 -> 7.6.6 |
| [telemetry] |
v7.6.4 -> 7.6.6 |
| [obsolete] |
v7.6.3 -> 7.6.6 |
| [fortipolicy-tag] |
v7.2.4 -> v7.6.2 |
- subnet - IP address and subnet mask of address. type: str
more...
|
Supported Version Ranges |
| subnet |
v6.0.0 -> 7.6.6 |
- subnet_name - Subnet name. type: str
more...
|
Supported Version Ranges |
| subnet_name |
v6.0.0 -> 7.6.6 |
- sw_version - Dynamic address matching software version. type: str
more...
|
Supported Version Ranges |
| sw_version |
v7.4.0 -> 7.6.6 |
- tag_detection_level - Tag detection level of dynamic address object. type: str
more...
|
Supported Version Ranges |
| tag_detection_level |
v7.0.4 -> 7.6.6 |
- tag_type - Tag type of dynamic address object. type: str
more...
|
Supported Version Ranges |
| tag_type |
v7.0.4 -> 7.6.6 |
- tagging - Config object tagging. type: list member_path: tagging:name
more...
| Supported Version Ranges |
| tagging |
v6.0.0 -> 7.6.6 |
- category - Tag category. Source system.object-tagging.category. type: str
more...
|
Supported Version Ranges |
| category |
v6.0.0 -> 7.6.6 |
- name - Tagging entry name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- tags - Tags. type: list member_path: tagging:name/tags:name
more...
| Supported Version Ranges |
| tags |
v6.0.0 -> 7.6.6 |
- name - Tag name. Source system.object-tagging.tags.name. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- tenant - Tenant. type: str
more...
|
Supported Version Ranges |
| tenant |
v6.0.0 -> 7.6.6 |
- type - Type of address. type: str choices: ipmask, iprange, fqdn, geography, wildcard, dynamic, interface-subnet, mac, route-tag, wildcard-fqdn
more...
|
Supported Version Ranges |
| type |
v6.0.0 -> 7.6.6 |
| [ipmask] |
v6.0.0 -> 7.6.6 |
| [iprange] |
v6.0.0 -> 7.6.6 |
| [fqdn] |
v6.0.0 -> 7.6.6 |
| [geography] |
v6.0.0 -> 7.6.6 |
| [wildcard] |
v6.0.0 -> 7.6.6 |
| [dynamic] |
v6.0.0 -> 7.6.6 |
| [interface-subnet] |
v6.2.0 -> 7.6.6 |
| [mac] |
v6.2.0 -> 7.6.6 |
| [route-tag] |
v7.4.0 -> 7.6.6 |
| [wildcard-fqdn] |
v6.0.0 -> v6.0.11 |
- uuid - Universally Unique Identifier (UUID; automatically assigned but can be manually reset). type: str
more...
|
Supported Version Ranges |
| uuid |
v6.0.0 -> 7.6.6 |
- visibility - Enable/disable address visibility in the GUI. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| visibility |
v6.0.0 -> v6.2.7 |
| [enable] |
v6.0.0 -> v6.2.7 |
| [disable] |
v6.0.0 -> v6.2.7 |
- wildcard - IP address and wildcard netmask. type: str
more...
|
Supported Version Ranges |
| wildcard |
v6.0.0 -> 7.6.6 |
- wildcard_fqdn - Fully Qualified Domain Name with wildcard characters. type: str
more...
|
Supported Version Ranges |
| wildcard_fqdn |
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 IPv4 addresses.
fortinet.fortios.fortios_firewall_address:
vdom: "{{ vdom }}"
state: "present"
access_token: ""
firewall_address:
agent_id: " (source telemetry-controller.agent.agent-id)"
allow_routing: "enable"
associated_interface: " (source system.interface.name system.zone.name)"
cache_ttl: "0"
clearpass_spt: "unknown"
color: "0"
comment: "Comment."
country: ""
end_ip: ""
end_mac: ""
epg_name: ""
fabric_object: "enable"
filter: ""
fqdn: ""
fsso_group:
-
name: "default_name_18 (source user.adgrp.name)"
hw_model: ""
hw_vendor: ""
interface: " (source system.interface.name)"
list:
-
ip: ""
net_id: ""
obj_id: ""
macaddr:
-
macaddr: ""
name: "default_name_28"
node_ip_only: "enable"
obj_id: ""
obj_tag: ""
obj_type: "ip"
organization: ""
os: ""
passive_fqdn_learning: "disable"
policy_group: ""
route_tag: "0"
sdn: " (source system.sdn-connector.name)"
sdn_addr_type: "private"
sdn_tag: ""
sso_attribute_value:
-
name: "default_name_42"
start_ip: ""
start_mac: ""
sub_type: "sdn"
subnet: ""
subnet_name: ""
sw_version: ""
tag_detection_level: ""
tag_type: ""
tagging:
-
category: " (source system.object-tagging.category)"
name: "default_name_53"
tags:
-
name: "default_name_55 (source system.object-tagging.tags.name)"
tenant: ""
type: "ipmask"
uuid: ""
visibility: "enable"
wildcard: ""
wildcard_fqdn: ""
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.