fmgd_firewall_proxyaddress – Configure web proxy address.
Added in version 1.1.0.
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
Supported Version Ranges: v7.4.8 -> v7.4.10, v7.6.4 -> latest
Parameters
- 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
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- 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
- firewall_proxyaddress - Configure web proxy address. type: dict
- _image_base64 (Alias name: _image-base64) Image base64. type: str more...
- application Saas application. type: list more...
- case_sensitivity (Alias name: case-sensitivity) Enable to make the pattern case sensitive. type: str choices: [disable, enable] more...
- category Fortiguard category id. type: list more...
- color Integer value to determine the color of the icon in the gui (1 - 32, default = 0, which sets value to 1). type: int more...
- comment Optional comments. type: str more...
- header Http header name as a regular expression. type: str more...
- header_group (Alias name: header-group) Header group. type: list more...
- header_name (Alias name: header-name) Name of http header. type: str more...
- host Address object for the host. type: list more...
- host_regex (Alias name: host-regex) Host name as a regular expression. type: str more...
- method Http request methods to be used. type: list choices: [delete, get, head, options, post, put, trace, connect, other, update, patch] more...
- name Address name. type: str more...
- path Url path as a regular expression. type: str more...
- post_arg (Alias name: post-arg) Post arg. type: str choices: [disable, enable] more...
- query Match the query part of the url as a regular expression. type: str more...
- referrer Enable/disable use of referrer field in the http header to match the address. type: str choices: [disable, enable] more...
- tagging Tagging. type: list more...
- type Proxy address type. type: str choices: [host-regex, url, category, method, ua, header, src-advanced, dst-advanced, url-list, saas, response-header, llm-server] more...
- ua Names of browsers to be used as user agent. type: list choices: [chrome, ms, firefox, safari, other, ie, edge] more...
- ua_max_ver (Alias name: ua-max-ver) Maximum version of the user agent specified in dotted notation. type: str more...
- ua_min_ver (Alias name: ua-min-ver) Minimum version of the user agent specified in dotted notation. type: str more...
- url_list (Alias name: url-list) Url list. type: list more...
- uuid Universally unique identifier (uuid; automatically assigned but can be manually reset). type: str more...
- visibility Enable/disable visibility of the object in the gui. type: str choices: [disable, enable] more...
- tags Names of object-tags (as configured in config system object-tag) applied to address. type: list more...
- llm_servers (Alias name: llm-servers) Llm servers. type: list more...
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
- 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 web proxy address.
fortinet.fmgdevice.fmgd_firewall_proxyaddress:
# bypass_validation: false
# workspace_locking_adom: <global or your adom name>
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device: <your own value>
vdom: <your own value>
state: present # <value in [present, absent]>
firewall_proxyaddress:
name: "your value" # Required variable, string
# _image_base64: <string>
# application: <list or string>
# case_sensitivity: <value in [disable, enable]>
# category: <list or string>
# color: <integer>
# comment: <string>
# header: <string>
# header_group:
# - case_sensitivity: <value in [disable, enable]>
# header: <string>
# header_name: <string>
# id: <integer>
# header_name: <string>
# host: <list or string>
# host_regex: <string>
# method:
# - "delete"
# - "get"
# - "head"
# - "options"
# - "post"
# - "put"
# - "trace"
# - "connect"
# - "other"
# - "update"
# - "patch"
# path: <string>
# post_arg: <value in [disable, enable]>
# query: <string>
# referrer: <value in [disable, enable]>
# tagging:
# - category: <list or string>
# name: <string>
# tags: <list or string>
# type: <value in [host-regex, url, category, ...]>
# ua:
# - "chrome"
# - "ms"
# - "firefox"
# - "safari"
# - "other"
# - "ie"
# - "edge"
# ua_max_ver: <string>
# ua_min_ver: <string>
# url_list: <list or string>
# uuid: <string>
# visibility: <value in [disable, enable]>
# tags: <list or string>
# llm_servers: <list or string>
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:
- 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.