fmgr_pkg_firewall_consolidated_policy – Configure consolidated IPv4/IPv6 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.
Requirements¶
The below requirements are needed on the host that executes this module.
- ansible>=2.9.0
Parameters¶
- 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
- 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_consolidated_policy - no description type: dict
- action - Policy action (allow/deny/ipsec). type: str choices: [deny, accept, ipsec] more...
- app-category - Application category ID list. type: str more...
- app-group - Application group names. type: str more...
- application - Application. type: int more...
- application-list - Name of an existing Application list. type: str more...
- auto-asic-offload - Enable/disable offloading security profile processing to CP processors. type: str choices: [disable, enable] more...
- av-profile - Name of an existing Antivirus profile. type: str more...
- cifs-profile - Name of an existing CIFS profile. type: str more...
- comments - Comment. type: str more...
- diffserv-forward - Enable to change packets DiffServ values to the specified diffservcode-forward value. type: str choices: [disable, enable] more...
- diffserv-reverse - Enable to change packets reverse (reply) DiffServ values to the specified diffservcode-rev value. type: str choices: [disable, enable] more...
- diffservcode-forward - Change packets DiffServ to this value. type: str more...
- diffservcode-rev - Change packets reverse (reply) DiffServ to this value. type: str more...
- dlp-sensor - Name of an existing DLP sensor. type: str more...
- dnsfilter-profile - Name of an existing DNS filter profile. type: str more...
- dstaddr4 - Destination IPv4 address name and address group names. type: str more...
- dstaddr6 - Destination IPv6 address name and address group names. type: str more...
- dstintf - Outgoing (egress) interface. type: str more...
- emailfilter-profile - Name of an existing email filter profile. type: str more...
- fixedport - Enable to prevent source NAT from changing a sessions source port. type: str choices: [disable, enable] more...
- groups - Names of user groups that can authenticate with this policy. type: str more...
- http-policy-redirect - Redirect HTTP(S) traffic to matching transparent web proxy policy. type: str choices: [disable, enable] more...
- icap-profile - Name of an existing ICAP profile. type: str more...
- inbound - Policy-based IPsec VPN: only traffic from the remote network can initiate a VPN. type: str choices: [disable, enable] more...
- inspection-mode - Policy inspection mode (Flow/proxy). type: str choices: [proxy, flow] more...
- internet-service - Enable/disable use of Internet Services for this policy. type: str choices: [disable, enable] more...
- internet-service-custom - Custom Internet Service name. type: str more...
- internet-service-custom-group - Custom Internet Service group name. type: str more...
- internet-service-group - Internet Service group name. type: str more...
- internet-service-id - Internet Service ID. type: str more...
- internet-service-src - Enable/disable use of Internet Services in source for this policy. type: str choices: [disable, enable] more...
- internet-service-src-custom - Custom Internet Service source name. type: str more...
- internet-service-src-custom-group - Custom Internet Service source group name. type: str more...
- internet-service-src-group - Internet Service source group name. type: str more...
- internet-service-src-id - Internet Service source ID. type: str more...
- ippool - Enable to use IP Pools for source NAT. type: str choices: [disable, enable] more...
- ips-sensor - Name of an existing IPS sensor. type: str more...
- logtraffic - Enable or disable logging. type: str choices: [disable, all, utm] more...
- logtraffic-start - Record logs when a session starts. type: str choices: [disable, enable] more...
- mms-profile - Name of an existing MMS profile. type: str more...
- name - Policy name. type: str more...
- nat - Enable/disable source NAT. type: str choices: [disable, enable] more...
- outbound - Policy-based IPsec VPN: only traffic from the internal network can initiate a VPN. type: str choices: [disable, enable] more...
- per-ip-shaper - Per-IP traffic shaper. type: str more...
- policyid - Policy ID (0 - 4294967294). type: int more...
- poolname4 - IPv4 pool names. type: str more...
- poolname6 - IPv6 pool names. type: str more...
- profile-group - Name of profile group. type: str more...
- profile-protocol-options - Name of an existing Protocol options profile. type: str more...
- profile-type - Determine whether the firewall policy allows security profile groups or single profiles only. type: str choices: [single, group] more...
- schedule - Schedule name. type: str more...
- service - Service and service group names. type: str more...
- session-ttl - TTL in seconds for sessions accepted by this policy (0 means use the system default session TTL). type: int more...
- srcaddr4 - Source IPv4 address name and address group names. type: str more...
- srcaddr6 - Source IPv6 address name and address group names. type: str more...
- srcintf - Incoming (ingress) interface. type: str more...
- ssh-filter-profile - Name of an existing SSH filter profile. type: str more...
- ssh-policy-redirect - Redirect SSH traffic to matching transparent proxy policy. type: str choices: [disable, enable] more...
- ssl-ssh-profile - Name of an existing SSL SSH profile. type: str more...
- status - Enable or disable this policy. type: str choices: [disable, enable] more...
- tcp-mss-receiver - Receiver TCP maximum segment size (MSS). type: int more...
- tcp-mss-sender - Sender TCP maximum segment size (MSS). type: int more...
- traffic-shaper - Traffic shaper. type: str more...
- traffic-shaper-reverse - Reverse traffic shaper. type: str more...
- url-category - URL category ID list. type: str more...
- users - Names of individual users that can authenticate with this policy. type: str more...
- utm-status - Enable to add one or more security profiles (AV, IPS, etc. type: str choices: [disable, enable] more...
- uuid - Universally Unique Identifier (UUID; automatically assigned but can be manually reset). type: str more...
- voip-profile - Name of an existing VoIP profile. type: str more...
- vpntunnel - Policy-based IPsec VPN: name of the IPsec VPN Phase 1. type: str more...
- waf-profile - Name of an existing Web application firewall profile. type: str more...
- wanopt - Enable/disable WAN optimization. type: str choices: [disable, enable] more...
- wanopt-detection - WAN optimization auto-detection mode. type: str choices: [active, passive, off] more...
- wanopt-passive-opt - WAN optimization passive mode options. type: str choices: [default, transparent, non-transparent] more...
- wanopt-peer - WAN optimization peer. type: str more...
- wanopt-profile - WAN optimization profile. type: str more...
- webcache - Enable/disable web cache. type: str choices: [disable, enable] more...
- webcache-https - Enable/disable web cache for HTTPS. type: str choices: [disable, enable] more...
- webfilter-profile - Name of an existing Web filter profile. type: str more...
- webproxy-forward-server - Webproxy forward server name. type: str more...
- webproxy-profile - Webproxy profile name. type: str more...
- captive-portal-exempt - Enable exemption of some users from the captive portal. type: str choices: [disable, enable] more...
- dstaddr-negate - When enabled dstaddr specifies what the destination address must NOT be. type: str choices: [disable, enable] more...
- fsso-groups - Names of FSSO groups. type: str more...
- global-label - Label for the policy that appears when the GUI is in Global View mode. type: str more...
- internet-service-negate - When enabled internet-service specifies what the service must NOT be. type: str choices: [disable, enable] more...
- internet-service-src-negate - When enabled internet-service-src specifies what the service must NOT be. type: str choices: [disable, enable] more...
- service-negate - When enabled service specifies what the service must NOT be. type: str choices: [disable, enable] more...
- srcaddr-negate - When enabled srcaddr specifies what the source address must NOT be. type: str choices: [disable, enable] 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¶
- 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: no description
fmgr_pkg_firewall_consolidated_policy:
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_consolidated_policy:
action: <value in [deny, accept, ipsec]>
app-category: <value of string>
app-group: <value of string>
application: <value of integer>
application-list: <value of string>
auto-asic-offload: <value in [disable, enable]>
av-profile: <value of string>
cifs-profile: <value of string>
comments: <value of string>
diffserv-forward: <value in [disable, enable]>
diffserv-reverse: <value in [disable, enable]>
diffservcode-forward: <value of string>
diffservcode-rev: <value of string>
dlp-sensor: <value of string>
dnsfilter-profile: <value of string>
dstaddr4: <value of string>
dstaddr6: <value of string>
dstintf: <value of string>
emailfilter-profile: <value of string>
fixedport: <value in [disable, enable]>
groups: <value of string>
http-policy-redirect: <value in [disable, enable]>
icap-profile: <value of string>
inbound: <value in [disable, enable]>
inspection-mode: <value in [proxy, flow]>
internet-service: <value in [disable, enable]>
internet-service-custom: <value of string>
internet-service-custom-group: <value of string>
internet-service-group: <value of string>
internet-service-id: <value of string>
internet-service-src: <value in [disable, enable]>
internet-service-src-custom: <value of string>
internet-service-src-custom-group: <value of string>
internet-service-src-group: <value of string>
internet-service-src-id: <value of string>
ippool: <value in [disable, enable]>
ips-sensor: <value of string>
logtraffic: <value in [disable, all, utm]>
logtraffic-start: <value in [disable, enable]>
mms-profile: <value of string>
name: <value of string>
nat: <value in [disable, enable]>
outbound: <value in [disable, enable]>
per-ip-shaper: <value of string>
policyid: <value of integer>
poolname4: <value of string>
poolname6: <value of string>
profile-group: <value of string>
profile-protocol-options: <value of string>
profile-type: <value in [single, group]>
schedule: <value of string>
service: <value of string>
session-ttl: <value of integer>
srcaddr4: <value of string>
srcaddr6: <value of string>
srcintf: <value of string>
ssh-filter-profile: <value of string>
ssh-policy-redirect: <value in [disable, enable]>
ssl-ssh-profile: <value of string>
status: <value in [disable, enable]>
tcp-mss-receiver: <value of integer>
tcp-mss-sender: <value of integer>
traffic-shaper: <value of string>
traffic-shaper-reverse: <value of string>
url-category: <value of string>
users: <value of string>
utm-status: <value in [disable, enable]>
uuid: <value of string>
voip-profile: <value of string>
vpntunnel: <value of string>
waf-profile: <value of string>
wanopt: <value in [disable, enable]>
wanopt-detection: <value in [active, passive, off]>
wanopt-passive-opt: <value in [default, transparent, non-transparent]>
wanopt-peer: <value of string>
wanopt-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>
captive-portal-exempt: <value in [disable, enable]>
dstaddr-negate: <value in [disable, enable]>
fsso-groups: <value of string>
global-label: <value of string>
internet-service-negate: <value in [disable, enable]>
internet-service-src-negate: <value in [disable, enable]>
service-negate: <value in [disable, enable]>
srcaddr-negate: <value in [disable, enable]>
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