fortios_firewall_proxy_address – Web proxy address configuration in Fortinet’s FortiOS and FortiGate¶
New in version 2.8.
Synopsis¶
This module is able to configure a FortiGate or FortiOS by allowing the user to configure firewall feature and proxy_address category. Examples includes all options and need to be adjusted to datasources before usage. Tested with FOS v6.0.2
Requirements¶
The below requirements are needed on the host that executes this module.
fortiosapi>=0.9.8
Parameters¶
Parameter | Choices/Defaults | Comments | |||
---|---|---|---|---|---|
firewall_proxy_address
-
|
Default: null
|
Web proxy address configuration.
|
|||
case-sensitivity
-
|
|
Enable to make the pattern case sensitive.
|
|||
category
-
|
FortiGuard category ID.
|
||||
id
-
/ required
|
Fortiguard category id.
|
||||
color
-
|
Integer value to determine the color of the icon in the GUI (1 - 32, default = 0, which sets value to 1).
|
||||
comment
-
|
Optional comments.
|
||||
header
-
|
HTTP header name as a regular expression.
|
||||
header-group
-
|
HTTP header group.
|
||||
case-sensitivity
-
|
|
Case sensitivity in pattern.
|
|||
header
-
|
HTTP header regular expression.
|
||||
header-name
-
|
HTTP header.
|
||||
id
-
/ required
|
ID.
|
||||
header-name
-
|
Name of HTTP header.
|
||||
host
-
|
Address object for the host. Source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name.
|
||||
host-regex
-
|
Host name as a regular expression.
|
||||
method
-
|
|
HTTP request methods to be used.
|
|||
name
-
/ required
|
Address name.
|
||||
path
-
|
URL path as a regular expression.
|
||||
query
-
|
Match the query part of the URL as a regular expression.
|
||||
referrer
-
|
|
Enable/disable use of referrer field in the HTTP header to match the address.
|
|||
state
-
|
|
Indicates whether to create or remove the object
|
|||
tagging
-
|
Config object tagging.
|
||||
category
-
|
Tag category. Source system.object-tagging.category.
|
||||
name
-
/ required
|
Tagging entry name.
|
||||
tags
-
|
Tags.
|
||||
name
-
/ required
|
Tag name. Source system.object-tagging.tags.name.
|
||||
type
-
|
|
Proxy address type.
|
|||
ua
-
|
|
Names of browsers to be used as user agent.
|
|||
uuid
-
|
Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
|
||||
visibility
-
|
|
Enable/disable visibility of the object in the GUI.
|
|||
host
-
/ required
|
FortiOS or FortiGate ip address.
|
||||
https
boolean
|
|
Indicates if the requests towards FortiGate must use HTTPS protocol
|
|||
password
-
|
Default: ""
|
FortiOS or FortiGate password.
|
|||
username
-
/ required
|
FortiOS or FortiGate username.
|
||||
vdom
-
|
Default: "root"
|
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.
|
Notes¶
Note
Requires fortiosapi library developed by Fortinet
Run as a local_action in your playbook
Examples¶
- hosts: localhost
vars:
host: "192.168.122.40"
username: "admin"
password: ""
vdom: "root"
tasks:
- name: Web proxy address configuration.
fortios_firewall_proxy_address:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "False"
firewall_proxy_address:
state: "present"
case-sensitivity: "disable"
category:
-
id: "5"
color: "6"
comment: "Optional comments."
header: "<your_own_value>"
header-group:
-
case-sensitivity: "disable"
header: "<your_own_value>"
header-name: "<your_own_value>"
id: "13"
header-name: "<your_own_value>"
host: "myhostname (source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name)"
host-regex: "myhostname"
method: "get"
name: "default_name_18"
path: "<your_own_value>"
query: "<your_own_value>"
referrer: "enable"
tagging:
-
category: "<your_own_value> (source system.object-tagging.category)"
name: "default_name_24"
tags:
-
name: "default_name_26 (source system.object-tagging.tags.name)"
type: "host-regex"
ua: "chrome"
uuid: "<your_own_value>"
visibility: "enable"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
build
string
|
always |
Build number of the fortigate image
Sample:
1547
|
http_method
string
|
always |
Last method used to provision the content into FortiGate
Sample:
PUT
|
http_status
string
|
always |
Last result given by FortiGate on last operation applied
Sample:
200
|
mkey
string
|
success |
Master key (id) used in the last call to FortiGate
Sample:
id
|
name
string
|
always |
Name of the table used to fulfill the request
Sample:
urlfilter
|
path
string
|
always |
Path of the table used to fulfill the request
Sample:
webfilter
|
revision
string
|
always |
Internal revision number
Sample:
17.0.2.10658
|
serial
string
|
always |
Serial number of the unit
Sample:
FGVMEVYYQT3AB5352
|
status
string
|
always |
Indication of the operation's result
Sample:
success
|
vdom
string
|
always |
Virtual domain used
Sample:
root
|
version
string
|
always |
Version of the FortiGate
Sample:
v5.6.3
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]