fmgr_pkg_firewall_proxypolicy – Configure proxy policies.¶
New in version 2.10.
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 v6.0.0.
Requirements¶
The below requirements are needed on the host that executes this module.
- ansible>=2.9.0
Parameters¶
- 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
- 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
- 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
- adom - The parameter in requested url type: str required: true
- pkg - The parameter in requested url type: str required: true
- pkg_firewall_proxypolicy - Configure proxy policies. type: dict
- action - Accept or deny traffic matching the policy parameters. type: str choices: [accept, deny, redirect]
- application-list - Name of an existing Application list. type: str
- av-profile - Name of an existing Antivirus profile. type: str
- comments - Optional comments. type: str
- disclaimer - Web proxy disclaimer setting: by domain, policy, or user. type: str choices: [disable, domain, policy, user]
- dlp-sensor - Name of an existing DLP sensor. type: str
- dstaddr - Destination address objects. type: str
- dstaddr-negate - When enabled, destination addresses match against any address EXCEPT the specified destination addresses. type: str choices: [disable, enable]
- dstaddr6 - IPv6 destination address objects. type: str
- dstintf - Destination interface names. type: str
- global-label - Global web-based manager visible label. type: str
- groups - Names of group objects. type: str
- http-tunnel-auth - Enable/disable HTTP tunnel authentication. type: str choices: [disable, enable]
- icap-profile - Name of an existing ICAP profile. type: str
- internet-service - Enable/disable use of Internet Services for this policy. type: str choices: [disable, enable]
- internet-service-custom - Custom Internet Service name. type: str
- internet-service-id - Internet Service ID. type: str
- internet-service-negate - When enabled, Internet Services match against any internet service EXCEPT the selected Internet Service. type: str choices: [disable, enable]
- ips-sensor - Name of an existing IPS sensor. type: str
- label - VDOM-specific GUI visible label. type: str
- logtraffic - Enable/disable logging traffic through the policy. type: str choices: [disable, all, utm]
- logtraffic-start - Enable/disable policy log traffic start. type: str choices: [disable, enable]
- mms-profile - Name of an existing MMS profile. type: str
- policyid - Policy ID. type: int
- poolname - Name of IP pool object. type: str
- profile-group - Name of profile group. type: str
- profile-protocol-options - Name of an existing Protocol options profile. type: str
- profile-type - Determine whether the firewall policy allows security profile groups or single profiles only. type: str choices: [single, group]
- proxy - Type of explicit proxy. type: str choices: [explicit-web, transparent-web, ftp, wanopt, ssh, ssh-tunnel]
- redirect-url - Redirect URL for further explicit web proxy processing. type: str
- replacemsg-override-group - Authentication replacement message override group. type: str
- scan-botnet-connections - Enable/disable scanning of connections to Botnet servers. type: str choices: [disable, block, monitor]
- schedule - Name of schedule object. type: str
- service - Name of service objects. type: str
- service-negate - When enabled, services match against any service EXCEPT the specified destination services. type: str choices: [disable, enable]
- spamfilter-profile - Name of an existing Spam filter profile. type: str
- srcaddr - Source address objects (must be set when using Web proxy). type: str
- srcaddr-negate - When enabled, source addresses match against any address EXCEPT the specified source addresses. type: str choices: [disable, enable]
- srcaddr6 - IPv6 source address objects. type: str
- srcintf - Source interface names. type: str
- ssl-ssh-profile - Name of an existing SSL SSH profile. type: str
- status - Enable/disable the active status of the policy. type: str choices: [disable, enable]
- tags - Names of object-tags applied to address. type: str
- transparent - Enable to use the IP address of the client to connect to the server. type: str choices: [disable, enable]
- users - Names of user objects. type: str
- utm-status - Enable the use of UTM profiles/sensors/lists. type: str choices: [disable, enable]
- uuid - Universally Unique Identifier (UUID; automatically assigned but can be manually reset). type: str
- waf-profile - Name of an existing Web application firewall profile. type: str
- webcache - Enable/disable web caching. type: str choices: [disable, enable]
- webcache-https - Enable/disable web caching for HTTPS (Requires deep-inspection enabled in ssl-ssh-profile). type: str choices: [disable, enable]
- webfilter-profile - Name of an existing Web filter profile. type: str
- webproxy-forward-server - Name of web proxy forward server. type: str
- webproxy-profile - Name of web proxy profile. type: str
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¶
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure proxy policies.
fmgr_pkg_firewall_proxypolicy:
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>
pkg: <your own value>
state: <value in [present, absent]>
pkg_firewall_proxypolicy:
action: <value in [accept, deny, redirect]>
application-list: <value of string>
av-profile: <value of string>
comments: <value of string>
disclaimer: <value in [disable, domain, policy, ...]>
dlp-sensor: <value of string>
dstaddr: <value of string>
dstaddr-negate: <value in [disable, enable]>
dstaddr6: <value of string>
dstintf: <value of string>
global-label: <value of string>
groups: <value of string>
http-tunnel-auth: <value in [disable, enable]>
icap-profile: <value of string>
internet-service: <value in [disable, enable]>
internet-service-custom: <value of string>
internet-service-id: <value of string>
internet-service-negate: <value in [disable, enable]>
ips-sensor: <value of string>
label: <value of string>
logtraffic: <value in [disable, all, utm]>
logtraffic-start: <value in [disable, enable]>
mms-profile: <value of string>
policyid: <value of integer>
poolname: <value of string>
profile-group: <value of string>
profile-protocol-options: <value of string>
profile-type: <value in [single, group]>
proxy: <value in [explicit-web, transparent-web, ftp, ...]>
redirect-url: <value of string>
replacemsg-override-group: <value of string>
scan-botnet-connections: <value in [disable, block, monitor]>
schedule: <value of string>
service: <value of string>
service-negate: <value in [disable, enable]>
spamfilter-profile: <value of string>
srcaddr: <value of string>
srcaddr-negate: <value in [disable, enable]>
srcaddr6: <value of string>
srcintf: <value of string>
ssl-ssh-profile: <value of string>
status: <value in [disable, enable]>
tags: <value of string>
transparent: <value in [disable, enable]>
users: <value of string>
utm-status: <value in [disable, enable]>
uuid: <value of string>
waf-profile: <value of string>
webcache: <value in [disable, enable]>
webcache-https: <value in [disable, enable]>
webfilter-profile: <value of string>
webproxy-forward-server: <value of string>
webproxy-profile: <value of 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:
- 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_message - The descriptive message of the api response returned: always type: str sample: OK
- response_data - The data body of the api response returned: optional type: list or dict