fortinet.fortimanager.fmgr_pm_config_pblock_firewall_policy module – Configure IPv4/IPv6 policies.

Note

This module is part of the fortinet.fortimanager collection (version 2.4.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install fortinet.fortimanager.

To use it in a playbook, specify: fortinet.fortimanager.fmgr_pm_config_pblock_firewall_policy.

New in fortinet.fortimanager 2.1.0

Synopsis

  • This module is able to configure a FortiManager device.

  • Examples include all parameters and values which need to be adjusted to data sources before usage.

Parameters

Parameter

Comments

access_token

string

The token to access FortiManager without using username and password.

adom

string / required

The parameter (adom) in requested url.

bypass_validation

boolean

Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters.

Choices:

  • false ← (default)

  • true

enable_log

boolean

Enable/Disable logging for task.

Choices:

  • false ← (default)

  • true

forticloud_access_token

string

Authenticate Ansible client with forticloud API access token.

pblock

string / required

The parameter (pblock) in requested url.

pm_config_pblock_firewall_policy

dictionary

The top level parameters set.

_policy_block

integer

Assigned policy block.

action

string

Policy action

Choices:

  • "deny"

  • "accept"

  • "ipsec"

  • "ssl-vpn"

  • "redirect"

  • "isolate"

anti-replay

string

Deprecated, please rename it to anti_replay. Enable/disable anti-replay check.

Choices:

  • "disable"

  • "enable"

app-category

any

(list) Deprecated, please rename it to app_category.

app-group

any

(list) Deprecated, please rename it to app_group.

application

any

(list) No description.

application-list

string

Deprecated, please rename it to application_list. Name of an existing Application list.

auth-cert

string

Deprecated, please rename it to auth_cert. HTTPS server certificate for policy authentication.

auth-path

string

Deprecated, please rename it to auth_path. Enable/disable authentication-based routing.

Choices:

  • "disable"

  • "enable"

auth-redirect-addr

string

Deprecated, please rename it to auth_redirect_addr. HTTP-to-HTTPS redirect address for firewall authentication.

auto-asic-offload

string

Deprecated, please rename it to auto_asic_offload. Enable/disable policy traffic ASIC offloading.

Choices:

  • "disable"

  • "enable"

av-profile

string

Deprecated, please rename it to av_profile. Name of an existing Antivirus profile.

best-route

string

Deprecated, please rename it to best_route.

Choices:

  • "disable"

  • "enable"

block-notification

string

Deprecated, please rename it to block_notification. Enable/disable block notification.

Choices:

  • "disable"

  • "enable"

captive-portal-exempt

string

Deprecated, please rename it to captive_portal_exempt. Enable to exempt some users from the captive portal.

Choices:

  • "disable"

  • "enable"

capture-packet

string

Deprecated, please rename it to capture_packet. Enable/disable capture packets.

Choices:

  • "disable"

  • "enable"

casb-profile

string

Deprecated, please rename it to casb_profile. Name of an existing CASB profile.

cgn-eif

string

Deprecated, please rename it to cgn_eif. Enable/Disable CGN endpoint independent filtering.

Choices:

  • "disable"

  • "enable"

cgn-eim

string

Deprecated, please rename it to cgn_eim. Enable/Disable CGN endpoint independent mapping

Choices:

  • "disable"

  • "enable"

cgn-log-server-grp

string

Deprecated, please rename it to cgn_log_server_grp. NP log server group name

cgn-resource-quota

integer

Deprecated, please rename it to cgn_resource_quota. Resource quota

cgn-session-quota

integer

Deprecated, please rename it to cgn_session_quota. Session quota

cifs-profile

string

Deprecated, please rename it to cifs_profile. Name of an existing CIFS profile.

comments

string

Comment.

custom-log-fields

any

(list) Deprecated, please rename it to custom_log_fields.

decrypted-traffic-mirror

string

Deprecated, please rename it to decrypted_traffic_mirror. Decrypted traffic mirror.

delay-tcp-npu-session

string

Deprecated, please rename it to delay_tcp_npu_session. Enable TCP NPU session delay to guarantee packet order of 3-way han…

Choices:

  • "disable"

  • "enable"

devices

any

(list) No description.

diameter-filter-profile

string

Deprecated, please rename it to diameter_filter_profile. Name of an existing Diameter filter profile.

diffserv-copy

string

Deprecated, please rename it to diffserv_copy. Enable to copy packets DiffServ values from sessions original direction to …

Choices:

  • "disable"

  • "enable"

diffserv-forward

string

Deprecated, please rename it to diffserv_forward. Enable to change packets DiffServ values to the specified diffservcode-f…

Choices:

  • "disable"

  • "enable"

diffserv-reverse

string

Deprecated, please rename it to diffserv_reverse. Enable to change packets reverse

Choices:

  • "disable"

  • "enable"

diffservcode-forward

string

Deprecated, please rename it to diffservcode_forward. Change packets DiffServ to this value.

diffservcode-rev

string

Deprecated, please rename it to diffservcode_rev. Change packets reverse

disclaimer

string

Enable/disable user authentication disclaimer.

Choices:

  • "disable"

  • "enable"

  • "user"

  • "domain"

  • "policy"

dlp-profile

string

Deprecated, please rename it to dlp_profile. Name of an existing DLP profile.

dlp-sensor

string

Deprecated, please rename it to dlp_sensor. Name of an existing DLP sensor.

dnsfilter-profile

string

Deprecated, please rename it to dnsfilter_profile. Name of an existing DNS filter profile.

dscp-match

string

Deprecated, please rename it to dscp_match. Enable DSCP check.

Choices:

  • "disable"

  • "enable"

dscp-negate

string

Deprecated, please rename it to dscp_negate. Enable negated DSCP match.

Choices:

  • "disable"

  • "enable"

dscp-value

string

Deprecated, please rename it to dscp_value. DSCP value.

dsri

string

Enable DSRI to ignore HTTP server responses.

Choices:

  • "disable"

  • "enable"

dstaddr

any

(list) No description.

dstaddr-negate

string

Deprecated, please rename it to dstaddr_negate. When enabled dstaddr/dstaddr6 specifies what the destination address must …

Choices:

  • "disable"

  • "enable"

dstaddr6

any

(list) No description.

dstaddr6-negate

string

Deprecated, please rename it to dstaddr6_negate. When enabled dstaddr6 specifies what the destination address must NOT be.

Choices:

  • "disable"

  • "enable"

dstintf

any

(list) No description.

dynamic-shaping

string

Deprecated, please rename it to dynamic_shaping. Enable/disable dynamic RADIUS defined traffic shaping.

Choices:

  • "disable"

  • "enable"

email-collect

string

Deprecated, please rename it to email_collect. Enable/disable email collection.

Choices:

  • "disable"

  • "enable"

emailfilter-profile

string

Deprecated, please rename it to emailfilter_profile. Name of an existing email filter profile.

fec

string

Enable/disable Forward Error Correction on traffic matching this policy on a FEC device.

Choices:

  • "disable"

  • "enable"

file-filter-profile

string

Deprecated, please rename it to file_filter_profile. Name of an existing file-filter profile.

firewall-session-dirty

string

Deprecated, please rename it to firewall_session_dirty. How to handle sessions if the configuration of this firewall polic…

Choices:

  • "check-all"

  • "check-new"

fixedport

string

Enable to prevent source NAT from changing a sessions source port.

Choices:

  • "disable"

  • "enable"

fsso

string

Enable/disable Fortinet Single Sign-On.

Choices:

  • "disable"

  • "enable"

fsso-agent-for-ntlm

string

Deprecated, please rename it to fsso_agent_for_ntlm. FSSO agent to use for NTLM authentication.

fsso-groups

any

(list) Deprecated, please rename it to fsso_groups.

geoip-anycast

string

Deprecated, please rename it to geoip_anycast. Enable/disable recognition of anycast IP addresses using the geography IP d…

Choices:

  • "disable"

  • "enable"

geoip-match

string

Deprecated, please rename it to geoip_match. Match geography address based either on its physical location or registered l…

Choices:

  • "physical-location"

  • "registered-location"

global-label

string

Deprecated, please rename it to global_label. Label for the policy that appears when the GUI is in Global View mode.

groups

any

(list) No description.

gtp-profile

string

Deprecated, please rename it to gtp_profile. GTP profile.

http-policy-redirect

string

Deprecated, please rename it to http_policy_redirect. Redirect HTTP

Choices:

  • "disable"

  • "enable"

icap-profile

string

Deprecated, please rename it to icap_profile. Name of an existing ICAP profile.

identity-based-route

string

Deprecated, please rename it to identity_based_route. Name of identity-based routing rule.

inbound

string

Policy-based IPsec VPN

Choices:

  • "disable"

  • "enable"

inspection-mode

string

Deprecated, please rename it to inspection_mode. Policy inspection mode

Choices:

  • "proxy"

  • "flow"

internet-service

string

Deprecated, please rename it to internet_service. Enable/disable use of Internet Services for this policy.

Choices:

  • "disable"

  • "enable"

internet-service-custom

any

(list) Deprecated, please rename it to internet_service_custom.

internet-service-custom-group

any

(list) Deprecated, please rename it to internet_service_custom_group.

internet-service-group

any

(list) Deprecated, please rename it to internet_service_group.

internet-service-id

any

(list) Deprecated, please rename it to internet_service_id.

internet-service-name

any

(list) Deprecated, please rename it to internet_service_name.

internet-service-negate

string

Deprecated, please rename it to internet_service_negate. When enabled internet-service specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

internet-service-src

string

Deprecated, please rename it to internet_service_src. Enable/disable use of Internet Services in source for this policy.

Choices:

  • "disable"

  • "enable"

internet-service-src-custom

any

(list) Deprecated, please rename it to internet_service_src_custom.

internet-service-src-custom-group

any

(list) Deprecated, please rename it to internet_service_src_custom_group.

internet-service-src-group

any

(list) Deprecated, please rename it to internet_service_src_group.

internet-service-src-id

any

(list) Deprecated, please rename it to internet_service_src_id.

internet-service-src-name

any

(list) Deprecated, please rename it to internet_service_src_name.

internet-service-src-negate

string

Deprecated, please rename it to internet_service_src_negate. When enabled internet-service-src specifies what the service …

Choices:

  • "disable"

  • "enable"

internet-service6

string

Deprecated, please rename it to internet_service6. Enable/disable use of IPv6 Internet Services for this policy.

Choices:

  • "disable"

  • "enable"

internet-service6-custom

any

(list) Deprecated, please rename it to internet_service6_custom.

internet-service6-custom-group

any

(list) Deprecated, please rename it to internet_service6_custom_group.

internet-service6-group

any

(list) Deprecated, please rename it to internet_service6_group.

internet-service6-name

any

(list) Deprecated, please rename it to internet_service6_name.

internet-service6-negate

string

Deprecated, please rename it to internet_service6_negate. When enabled internet-service6 specifies what the service must N…

Choices:

  • "disable"

  • "enable"

internet-service6-src

string

Deprecated, please rename it to internet_service6_src. Enable/disable use of IPv6 Internet Services in source for this policy.

Choices:

  • "disable"

  • "enable"

internet-service6-src-custom

any

(list) Deprecated, please rename it to internet_service6_src_custom.

internet-service6-src-custom-group

any

(list) Deprecated, please rename it to internet_service6_src_custom_group.

internet-service6-src-group

any

(list) Deprecated, please rename it to internet_service6_src_group.

internet-service6-src-name

any

(list) Deprecated, please rename it to internet_service6_src_name.

internet-service6-src-negate

string

Deprecated, please rename it to internet_service6_src_negate. When enabled internet-service6-src specifies what the servic…

Choices:

  • "disable"

  • "enable"

ip-version-type

string

Deprecated, please rename it to ip_version_type. IP version of the policy.

ippool

string

Enable to use IP Pools for source NAT.

Choices:

  • "disable"

  • "enable"

ips-sensor

string

Deprecated, please rename it to ips_sensor. Name of an existing IPS sensor.

ips-voip-filter

string

Deprecated, please rename it to ips_voip_filter. Name of an existing VoIP

label

string

Label for the policy that appears when the GUI is in Section View mode.

learning-mode

string

Deprecated, please rename it to learning_mode. Enable to allow everything, but log all of the meaningful data for security…

Choices:

  • "disable"

  • "enable"

logtraffic

string

Enable or disable logging.

Choices:

  • "disable"

  • "enable"

  • "all"

  • "utm"

logtraffic-start

string

Deprecated, please rename it to logtraffic_start. Record logs when a session starts.

Choices:

  • "disable"

  • "enable"

match-vip

string

Deprecated, please rename it to match_vip. Enable to match packets that have had their destination addresses changed by a VIP.

Choices:

  • "disable"

  • "enable"

match-vip-only

string

Deprecated, please rename it to match_vip_only. Enable/disable matching of only those packets that have had their destinat…

Choices:

  • "disable"

  • "enable"

mms-profile

string

Deprecated, please rename it to mms_profile. Name of an existing MMS profile.

name

string

Policy name.

nat

string

Enable/disable source NAT.

Choices:

  • "disable"

  • "enable"

nat46

string

Enable/disable NAT46.

Choices:

  • "disable"

  • "enable"

nat64

string

Enable/disable NAT64.

Choices:

  • "disable"

  • "enable"

natinbound

string

Policy-based IPsec VPN

Choices:

  • "disable"

  • "enable"

natip

string

Policy-based IPsec VPN

natoutbound

string

Policy-based IPsec VPN

Choices:

  • "disable"

  • "enable"

network-service-dynamic

any

(list) Deprecated, please rename it to network_service_dynamic.

network-service-src-dynamic

any

(list) Deprecated, please rename it to network_service_src_dynamic.

np-acceleration

string

Deprecated, please rename it to np_acceleration. Enable/disable UTM Network Processor acceleration.

Choices:

  • "disable"

  • "enable"

ntlm

string

Enable/disable NTLM authentication.

Choices:

  • "disable"

  • "enable"

ntlm-enabled-browsers

any

(list) Deprecated, please rename it to ntlm_enabled_browsers.

ntlm-guest

string

Deprecated, please rename it to ntlm_guest. Enable/disable NTLM guest user access.

Choices:

  • "disable"

  • "enable"

outbound

string

Policy-based IPsec VPN

Choices:

  • "disable"

  • "enable"

passive-wan-health-measurement

string

Deprecated, please rename it to passive_wan_health_measurement. Enable/disable passive WAN health measurement.

Choices:

  • "disable"

  • "enable"

pcp-inbound

string

Deprecated, please rename it to pcp_inbound. Enable/disable PCP inbound DNAT.

Choices:

  • "disable"

  • "enable"

pcp-outbound

string

Deprecated, please rename it to pcp_outbound. Enable/disable PCP outbound SNAT.

Choices:

  • "disable"

  • "enable"

pcp-poolname

any

(list) Deprecated, please rename it to pcp_poolname.

per-ip-shaper

string

Deprecated, please rename it to per_ip_shaper. Per-IP traffic shaper.

permit-any-host

string

Deprecated, please rename it to permit_any_host. Accept UDP packets from any host.

Choices:

  • "disable"

  • "enable"

permit-stun-host

string

Deprecated, please rename it to permit_stun_host. Accept UDP packets from any Session Traversal Utilities for NAT

Choices:

  • "disable"

  • "enable"

pfcp-profile

string

Deprecated, please rename it to pfcp_profile. PFCP profile.

policy-behaviour-type

string

Deprecated, please rename it to policy_behaviour_type. Behaviour of the policy.

policy-expiry

string

Deprecated, please rename it to policy_expiry. Enable/disable policy expiry.

Choices:

  • "disable"

  • "enable"

policy-expiry-date

string

Deprecated, please rename it to policy_expiry_date. Policy expiry date

policy-expiry-date-utc

string

Deprecated, please rename it to policy_expiry_date_utc. Policy expiry date and time, in epoch format.

policy-offload

string

Deprecated, please rename it to policy_offload. Enable/Disable hardware session setup for CGNAT.

Choices:

  • "disable"

  • "enable"

policyid

integer / required

Policy ID

poolname

any

(list) No description.

poolname6

any

(list) No description.

profile-group

string

Deprecated, please rename it to profile_group. Name of profile group.

profile-protocol-options

string

Deprecated, please rename it to profile_protocol_options. Name of an existing Protocol options profile.

profile-type

string

Deprecated, please rename it to profile_type. Determine whether the firewall policy allows security profile groups or sing…

Choices:

  • "single"

  • "group"

radius-mac-auth-bypass

string

Deprecated, please rename it to radius_mac_auth_bypass. Enable MAC authentication bypass.

Choices:

  • "disable"

  • "enable"

redirect-url

string

Deprecated, please rename it to redirect_url. URL users are directed to after seeing and accepting the disclaimer or authe…

replacemsg-override-group

string

Deprecated, please rename it to replacemsg_override_group. Override the default replacement message group for this policy.

reputation-direction

string

Deprecated, please rename it to reputation_direction. Direction of the initial traffic for reputation to take effect.

Choices:

  • "source"

  • "destination"

reputation-direction6

string

Deprecated, please rename it to reputation_direction6. Direction of the initial traffic for IPv6 reputation to take effect.

Choices:

  • "source"

  • "destination"

reputation-minimum

integer

Deprecated, please rename it to reputation_minimum. Minimum Reputation to take action.

reputation-minimum6

integer

Deprecated, please rename it to reputation_minimum6. IPv6 Minimum Reputation to take action.

rsso

string

Enable/disable RADIUS single sign-on

Choices:

  • "disable"

  • "enable"

rtp-addr

any

(list) Deprecated, please rename it to rtp_addr.

rtp-nat

string

Deprecated, please rename it to rtp_nat. Enable Real Time Protocol

Choices:

  • "disable"

  • "enable"

scan-botnet-connections

string

Deprecated, please rename it to scan_botnet_connections. Block or monitor connections to Botnet servers or disable Botnet …

Choices:

  • "disable"

  • "block"

  • "monitor"

schedule

string

Schedule name.

schedule-timeout

string

Deprecated, please rename it to schedule_timeout. Enable to force current sessions to end when the schedule object times out.

Choices:

  • "disable"

  • "enable"

sctp-filter-profile

string

Deprecated, please rename it to sctp_filter_profile. Name of an existing SCTP filter profile.

send-deny-packet

string

Deprecated, please rename it to send_deny_packet. Enable to send a reply when a session is denied or blocked by a firewall…

Choices:

  • "disable"

  • "enable"

service

any

(list) No description.

service-negate

string

Deprecated, please rename it to service_negate. When enabled service specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

session-ttl

any

(int or str) Deprecated, please rename it to session_ttl. TTL in seconds for sessions accepted by this policy

sgt

any

(list) No description.

sgt-check

string

Deprecated, please rename it to sgt_check. Enable/disable security group tags

Choices:

  • "disable"

  • "enable"

spamfilter-profile

string

Deprecated, please rename it to spamfilter_profile. Name of an existing Spam filter profile.

src-vendor-mac

any

(list) Deprecated, please rename it to src_vendor_mac.

srcaddr

any

(list) No description.

srcaddr-negate

string

Deprecated, please rename it to srcaddr_negate. When enabled srcaddr/srcaddr6 specifies what the source address must NOT be.

Choices:

  • "disable"

  • "enable"

srcaddr6

any

(list) No description.

srcaddr6-negate

string

Deprecated, please rename it to srcaddr6_negate. When enabled srcaddr6 specifies what the source address must NOT be.

Choices:

  • "disable"

  • "enable"

srcintf

any

(list) No description.

ssh-filter-profile

string

Deprecated, please rename it to ssh_filter_profile. Name of an existing SSH filter profile.

ssh-policy-redirect

string

Deprecated, please rename it to ssh_policy_redirect. Redirect SSH traffic to matching transparent proxy policy.

Choices:

  • "disable"

  • "enable"

ssl-mirror

string

Deprecated, please rename it to ssl_mirror. Enable to copy decrypted SSL traffic to a FortiGate interface

Choices:

  • "disable"

  • "enable"

ssl-mirror-intf

any

(list) Deprecated, please rename it to ssl_mirror_intf.

ssl-ssh-profile

string

Deprecated, please rename it to ssl_ssh_profile. Name of an existing SSL SSH profile.

status

string

Enable or disable this policy.

Choices:

  • "disable"

  • "enable"

tcp-mss-receiver

integer

Deprecated, please rename it to tcp_mss_receiver. Receiver TCP maximum segment size

tcp-mss-sender

integer

Deprecated, please rename it to tcp_mss_sender. Sender TCP maximum segment size

tcp-session-without-syn

string

Deprecated, please rename it to tcp_session_without_syn. Enable/disable creation of TCP session without SYN flag.

Choices:

  • "all"

  • "data-only"

  • "disable"

tcp-timeout-pid

string

Deprecated, please rename it to tcp_timeout_pid. TCP timeout profile ID

timeout-send-rst

string

Deprecated, please rename it to timeout_send_rst. Enable/disable sending RST packets when TCP sessions expire.

Choices:

  • "disable"

  • "enable"

tos

string

ToS

tos-mask

string

Deprecated, please rename it to tos_mask. Non-zero bit positions are used for comparison while zero bit positions are ignored.

tos-negate

string

Deprecated, please rename it to tos_negate. Enable negated TOS match.

Choices:

  • "disable"

  • "enable"

traffic-shaper

string

Deprecated, please rename it to traffic_shaper. Traffic shaper.

traffic-shaper-reverse

string

Deprecated, please rename it to traffic_shaper_reverse. Reverse traffic shaper.

udp-timeout-pid

string

Deprecated, please rename it to udp_timeout_pid. UDP timeout profile ID

url-category

any

(list) Deprecated, please rename it to url_category.

users

any

(list) No description.

utm-status

string

Deprecated, please rename it to utm_status. Enable to add one or more security profiles

Choices:

  • "disable"

  • "enable"

uuid

string

Universally Unique Identifier

videofilter-profile

string

Deprecated, please rename it to videofilter_profile. Name of an existing VideoFilter profile.

virtual-patch-profile

string

Deprecated, please rename it to virtual_patch_profile. Name of an existing virtual-patch profile.

vlan-cos-fwd

integer

Deprecated, please rename it to vlan_cos_fwd. VLAN forward direction user priority

vlan-cos-rev

integer

Deprecated, please rename it to vlan_cos_rev. VLAN reverse direction user priority

vlan-filter

string

Deprecated, please rename it to vlan_filter. Set VLAN filters.

voip-profile

string

Deprecated, please rename it to voip_profile. Name of an existing VoIP profile.

vpntunnel

string

Policy-based IPsec VPN

waf-profile

string

Deprecated, please rename it to waf_profile. Name of an existing Web application firewall profile.

wanopt

string

Enable/disable WAN optimization.

Choices:

  • "disable"

  • "enable"

wanopt-detection

string

Deprecated, please rename it to wanopt_detection. WAN optimization auto-detection mode.

Choices:

  • "active"

  • "passive"

  • "off"

wanopt-passive-opt

string

Deprecated, please rename it to wanopt_passive_opt. WAN optimization passive mode options.

Choices:

  • "default"

  • "transparent"

  • "non-transparent"

wanopt-peer

string

Deprecated, please rename it to wanopt_peer. WAN optimization peer.

wanopt-profile

string

Deprecated, please rename it to wanopt_profile. WAN optimization profile.

wccp

string

Enable/disable forwarding traffic matching this policy to a configured WCCP server.

Choices:

  • "disable"

  • "enable"

webcache

string

Enable/disable web cache.

Choices:

  • "disable"

  • "enable"

webcache-https

string

Deprecated, please rename it to webcache_https. Enable/disable web cache for HTTPS.

Choices:

  • "disable"

  • "ssl-server"

  • "any"

  • "enable"

webfilter-profile

string

Deprecated, please rename it to webfilter_profile. Name of an existing Web filter profile.

webproxy-forward-server

string

Deprecated, please rename it to webproxy_forward_server. Webproxy forward server name.

webproxy-profile

string

Deprecated, please rename it to webproxy_profile. Webproxy profile name.

wsso

string

Enable/disable WiFi Single Sign On

Choices:

  • "disable"

  • "enable"

ztna-device-ownership

string

Deprecated, please rename it to ztna_device_ownership. Enable/disable zero trust device ownership.

Choices:

  • "disable"

  • "enable"

ztna-ems-tag

any

(list) Deprecated, please rename it to ztna_ems_tag.

ztna-ems-tag-secondary

any

(list) Deprecated, please rename it to ztna_ems_tag_secondary.

ztna-geo-tag

any

(list) Deprecated, please rename it to ztna_geo_tag.

ztna-policy-redirect

string

Deprecated, please rename it to ztna_policy_redirect. Redirect ZTNA traffic to matching Access-Proxy proxy-policy.

Choices:

  • "disable"

  • "enable"

ztna-status

string

Deprecated, please rename it to ztna_status. Enable/disable zero trust access.

Choices:

  • "disable"

  • "enable"

ztna-tags-match-logic

string

Deprecated, please rename it to ztna_tags_match_logic. ZTNA tag matching logic.

Choices:

  • "or"

  • "and"

proposed_method

string

The overridden method for the underlying Json RPC request.

Choices:

  • "update"

  • "set"

  • "add"

rc_failed

list / elements=integer

The rc codes list with which the conditions to fail will be overriden.

rc_succeeded

list / elements=integer

The rc codes list with which the conditions to succeed will be overriden.

state

string / required

The directive to create, update or delete an object.

Choices:

  • "present"

  • "absent"

workspace_locking_adom

string

The adom to lock for FortiManager running in workspace mode, the value can be global and others including root.

workspace_locking_timeout

integer

The maximum time in seconds to wait for other user to release the workspace lock.

Default: 300

Notes

Note

  • Starting in version 2.4.0, all input arguments are named using the underscore naming convention (snake_case). Please change the arguments such as “var-name” to “var_name”. Old argument names are still available yet you will receive deprecation warnings. You can ignore this warning by setting deprecation_warnings=False in ansible.cfg.

  • 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
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: Configure IPv4/IPv6 policies.
      fortinet.fortimanager.fmgr_pm_config_pblock_firewall_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>
        pblock: <your own value>
        state: present # <value in [present, absent]>
        pm_config_pblock_firewall_policy:
          _policy_block: <integer>
          action: <value in [deny, accept, ipsec, ...]>
          anti_replay: <value in [disable, enable]>
          application_list: <string>
          auth_cert: <string>
          auth_path: <value in [disable, enable]>
          auth_redirect_addr: <string>
          auto_asic_offload: <value in [disable, enable]>
          av_profile: <string>
          block_notification: <value in [disable, enable]>
          captive_portal_exempt: <value in [disable, enable]>
          capture_packet: <value in [disable, enable]>
          cifs_profile: <string>
          comments: <string>
          custom_log_fields: <list or string>
          decrypted_traffic_mirror: <string>
          delay_tcp_npu_session: <value in [disable, enable]>
          diffserv_forward: <value in [disable, enable]>
          diffserv_reverse: <value in [disable, enable]>
          diffservcode_forward: <string>
          diffservcode_rev: <string>
          disclaimer: <value in [disable, enable, user, ...]>
          dlp_profile: <string>
          dnsfilter_profile: <string>
          dsri: <value in [disable, enable]>
          dstaddr: <list or string>
          dstaddr_negate: <value in [disable, enable]>
          dstaddr6: <list or string>
          dstintf: <list or string>
          dynamic_shaping: <value in [disable, enable]>
          email_collect: <value in [disable, enable]>
          emailfilter_profile: <string>
          fec: <value in [disable, enable]>
          file_filter_profile: <string>
          firewall_session_dirty: <value in [check-all, check-new]>
          fixedport: <value in [disable, enable]>
          fsso_agent_for_ntlm: <string>
          fsso_groups: <list or string>
          geoip_anycast: <value in [disable, enable]>
          geoip_match: <value in [physical-location, registered-location]>
          global_label: <string>
          groups: <list or string>
          gtp_profile: <string>
          http_policy_redirect: <value in [disable, enable]>
          icap_profile: <string>
          identity_based_route: <string>
          inbound: <value in [disable, enable]>
          inspection_mode: <value in [proxy, flow]>
          internet_service: <value in [disable, enable]>
          internet_service_custom: <list or string>
          internet_service_custom_group: <list or string>
          internet_service_group: <list or string>
          internet_service_name: <list or string>
          internet_service_negate: <value in [disable, enable]>
          internet_service_src: <value in [disable, enable]>
          internet_service_src_custom: <list or string>
          internet_service_src_custom_group: <list or string>
          internet_service_src_group: <list or string>
          internet_service_src_name: <list or string>
          internet_service_src_negate: <value in [disable, enable]>
          ippool: <value in [disable, enable]>
          ips_sensor: <string>
          label: <string>
          logtraffic: <value in [disable, enable, all, ...]>
          logtraffic_start: <value in [disable, enable]>
          match_vip: <value in [disable, enable]>
          match_vip_only: <value in [disable, enable]>
          name: <string>
          nat: <value in [disable, enable]>
          nat46: <value in [disable, enable]>
          nat64: <value in [disable, enable]>
          natinbound: <value in [disable, enable]>
          natip: <string>
          natoutbound: <value in [disable, enable]>
          np_acceleration: <value in [disable, enable]>
          ntlm: <value in [disable, enable]>
          ntlm_enabled_browsers: <list or string>
          ntlm_guest: <value in [disable, enable]>
          outbound: <value in [disable, enable]>
          passive_wan_health_measurement: <value in [disable, enable]>
          per_ip_shaper: <string>
          permit_any_host: <value in [disable, enable]>
          permit_stun_host: <value in [disable, enable]>
          pfcp_profile: <string>
          policy_expiry: <value in [disable, enable]>
          policy_expiry_date: <string>
          policyid: <integer>
          poolname: <list or string>
          poolname6: <list or string>
          profile_group: <string>
          profile_protocol_options: <string>
          profile_type: <value in [single, group]>
          radius_mac_auth_bypass: <value in [disable, enable]>
          redirect_url: <string>
          replacemsg_override_group: <string>
          reputation_direction: <value in [source, destination]>
          reputation_minimum: <integer>
          rtp_addr: <list or string>
          rtp_nat: <value in [disable, enable]>
          schedule: <string>
          schedule_timeout: <value in [disable, enable]>
          sctp_filter_profile: <string>
          send_deny_packet: <value in [disable, enable]>
          service: <list or string>
          service_negate: <value in [disable, enable]>
          session_ttl: <integer or string>
          sgt: <list or integer>
          sgt_check: <value in [disable, enable]>
          src_vendor_mac: <list or string>
          srcaddr: <list or string>
          srcaddr_negate: <value in [disable, enable]>
          srcaddr6: <list or string>
          srcintf: <list or string>
          ssh_filter_profile: <string>
          ssh_policy_redirect: <value in [disable, enable]>
          ssl_ssh_profile: <string>
          status: <value in [disable, enable]>
          tcp_mss_receiver: <integer>
          tcp_mss_sender: <integer>
          tcp_session_without_syn: <value in [all, data-only, disable]>
          timeout_send_rst: <value in [disable, enable]>
          tos: <string>
          tos_mask: <string>
          tos_negate: <value in [disable, enable]>
          traffic_shaper: <string>
          traffic_shaper_reverse: <string>
          users: <list or string>
          utm_status: <value in [disable, enable]>
          uuid: <string>
          videofilter_profile: <string>
          vlan_cos_fwd: <integer>
          vlan_cos_rev: <integer>
          vlan_filter: <string>
          voip_profile: <string>
          vpntunnel: <string>
          waf_profile: <string>
          wanopt: <value in [disable, enable]>
          wanopt_detection: <value in [active, passive, off]>
          wanopt_passive_opt: <value in [default, transparent, non-transparent]>
          wanopt_peer: <string>
          wanopt_profile: <string>
          wccp: <value in [disable, enable]>
          webcache: <value in [disable, enable]>
          webcache_https: <value in [disable, ssl-server, any, ...]>
          webfilter_profile: <string>
          webproxy_forward_server: <string>
          webproxy_profile: <string>
          ztna_ems_tag: <list or string>
          ztna_geo_tag: <list or string>
          ztna_status: <value in [disable, enable]>
          policy_offload: <value in [disable, enable]>
          cgn_session_quota: <integer>
          tcp_timeout_pid: <string>
          udp_timeout_pid: <string>
          dlp_sensor: <string>
          cgn_eif: <value in [disable, enable]>
          cgn_log_server_grp: <string>
          cgn_resource_quota: <integer>
          cgn_eim: <value in [disable, enable]>
          mms_profile: <string>
          app_category: <list or string>
          internet_service_src_id: <list or string>
          rsso: <value in [disable, enable]>
          internet_service_id: <list or string>
          best_route: <value in [disable, enable]>
          fsso: <value in [disable, enable]>
          url_category: <list or string>
          app_group: <list or string>
          ssl_mirror_intf: <list or string>
          wsso: <value in [disable, enable]>
          ssl_mirror: <value in [disable, enable]>
          application: <list or integer>
          dscp_negate: <value in [disable, enable]>
          learning_mode: <value in [disable, enable]>
          devices: <list or string>
          dscp_value: <string>
          spamfilter_profile: <string>
          scan_botnet_connections: <value in [disable, block, monitor]>
          dscp_match: <value in [disable, enable]>
          diffserv_copy: <value in [disable, enable]>
          dstaddr6_negate: <value in [disable, enable]>
          internet_service6: <value in [disable, enable]>
          internet_service6_custom: <list or string>
          internet_service6_custom_group: <list or string>
          internet_service6_group: <list or string>
          internet_service6_name: <list or string>
          internet_service6_negate: <value in [disable, enable]>
          internet_service6_src: <value in [disable, enable]>
          internet_service6_src_custom: <list or string>
          internet_service6_src_custom_group: <list or string>
          internet_service6_src_group: <list or string>
          internet_service6_src_name: <list or string>
          internet_service6_src_negate: <value in [disable, enable]>
          network_service_dynamic: <list or string>
          network_service_src_dynamic: <list or string>
          reputation_direction6: <value in [source, destination]>
          reputation_minimum6: <integer>
          srcaddr6_negate: <value in [disable, enable]>
          ip_version_type: <string>
          ips_voip_filter: <string>
          pcp_inbound: <value in [disable, enable]>
          pcp_outbound: <value in [disable, enable]>
          pcp_poolname: <list or string>
          policy_behaviour_type: <string>
          policy_expiry_date_utc: <string>
          ztna_device_ownership: <value in [disable, enable]>
          ztna_ems_tag_secondary: <list or string>
          ztna_policy_redirect: <value in [disable, enable]>
          ztna_tags_match_logic: <value in [or, and]>
          casb_profile: <string>
          virtual_patch_profile: <string>
          diameter_filter_profile: <string>

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

meta

dictionary

The result of the request.

Returned: always

request_url

string

The full url requested.

Returned: always

Sample: "/sys/login/user"

response_code

integer

The status of api request.

Returned: always

Sample: 0

response_data

list / elements=string

The api response.

Returned: always

response_message

string

The descriptive message of the api response.

Returned: always

Sample: "OK."

system_information

dictionary

The information of the target system.

Returned: always

rc

integer

The status the request.

Returned: always

Sample: 0

version_check_warning

list / elements=string

Warning if the parameters used in the playbook are not supported by the current FortiManager version.

Returned: complex

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)