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.8.2).

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

aliases: anti-replay

string

Enable/disable anti-replay check.

Choices:

  • "disable"

  • "enable"

app_category

aliases: app-category

any

(list) Application category ID list.

app_group

aliases: app-group

any

(list) Application group names.

application

any

(list) Application ID list.

application_list

aliases: application-list

string

Name of an existing Application list.

auth_cert

aliases: auth-cert

string

HTTPS server certificate for policy authentication.

auth_path

aliases: auth-path

string

Enable/disable authentication-based routing.

Choices:

  • "disable"

  • "enable"

auth_redirect_addr

aliases: auth-redirect-addr

string

HTTP-to-HTTPS redirect address for firewall authentication.

auto_asic_offload

aliases: auto-asic-offload

string

Enable/disable policy traffic ASIC offloading.

Choices:

  • "disable"

  • "enable"

av_profile

aliases: av-profile

string

Name of an existing Antivirus profile.

best_route

aliases: best-route

string

Best route.

Choices:

  • "disable"

  • "enable"

block_notification

aliases: block-notification

string

Enable/disable block notification.

Choices:

  • "disable"

  • "enable"

captive_portal_exempt

aliases: captive-portal-exempt

string

Enable to exempt some users from the captive portal.

Choices:

  • "disable"

  • "enable"

capture_packet

aliases: capture-packet

string

Enable/disable capture packets.

Choices:

  • "disable"

  • "enable"

casb_profile

aliases: casb-profile

string

Name of an existing CASB profile.

cgn_eif

aliases: cgn-eif

string

Enable/Disable CGN endpoint independent filtering.

Choices:

  • "disable"

  • "enable"

cgn_eim

aliases: cgn-eim

string

Enable/Disable CGN endpoint independent mapping

Choices:

  • "disable"

  • "enable"

cgn_log_server_grp

aliases: cgn-log-server-grp

string

NP log server group name

cgn_resource_quota

aliases: cgn-resource-quota

integer

Resource quota

cgn_session_quota

aliases: cgn-session-quota

integer

Session quota

cgn_sw_eif_ctrl

aliases: cgn-sw-eif-ctrl

string

Enable/disable software endpoint independent filtering control.

Choices:

  • "disable"

  • "enable"

cifs_profile

aliases: cifs-profile

string

Name of an existing CIFS profile.

comments

string

Comment.

custom_log_fields

aliases: custom-log-fields

any

(list) Custom fields to append to log messages for this policy.

decrypted_traffic_mirror

aliases: decrypted-traffic-mirror

string

Decrypted traffic mirror.

delay_tcp_npu_session

aliases: delay-tcp-npu-session

string

Enable TCP NPU session delay to guarantee packet order of 3-way handshake.

Choices:

  • "disable"

  • "enable"

devices

any

(list) Names of devices or device groups that can be matched by the policy.

diameter_filter_profile

aliases: diameter-filter-profile

string

Name of an existing Diameter filter profile.

diffserv_copy

aliases: diffserv-copy

string

Enable to copy packets DiffServ values from sessions original direction to its reply direction.

Choices:

  • "disable"

  • "enable"

diffserv_forward

aliases: diffserv-forward

string

Enable to change packets DiffServ values to the specified diffservcode-forward value.

Choices:

  • "disable"

  • "enable"

diffserv_reverse

aliases: diffserv-reverse

string

Enable to change packets reverse

Choices:

  • "disable"

  • "enable"

diffservcode_forward

aliases: diffservcode-forward

string

Change packets DiffServ to this value.

diffservcode_rev

aliases: diffservcode-rev

string

Change packets reverse

disclaimer

string

Enable/disable user authentication disclaimer.

Choices:

  • "disable"

  • "enable"

  • "user"

  • "domain"

  • "policy"

dlp_profile

aliases: dlp-profile

string

Name of an existing DLP profile.

dlp_sensor

aliases: dlp-sensor

string

Name of an existing DLP sensor.

dnsfilter_profile

aliases: dnsfilter-profile

string

Name of an existing DNS filter profile.

dscp_match

aliases: dscp-match

string

Enable DSCP check.

Choices:

  • "disable"

  • "enable"

dscp_negate

aliases: dscp-negate

string

Enable negated DSCP match.

Choices:

  • "disable"

  • "enable"

dscp_value

aliases: dscp-value

string

DSCP value.

dsri

string

Enable DSRI to ignore HTTP server responses.

Choices:

  • "disable"

  • "enable"

dstaddr

any

(list) Destination IPv4 address and address group names.

dstaddr6

any

(list) Destination IPv6 address name and address group names.

dstaddr6_negate

aliases: dstaddr6-negate

string

When enabled dstaddr6 specifies what the destination address must NOT be.

Choices:

  • "disable"

  • "enable"

dstaddr_negate

aliases: dstaddr-negate

string

When enabled dstaddr/dstaddr6 specifies what the destination address must NOT be.

Choices:

  • "disable"

  • "enable"

dstintf

any

(list) Outgoing

dynamic_shaping

aliases: dynamic-shaping

string

Enable/disable dynamic RADIUS defined traffic shaping.

Choices:

  • "disable"

  • "enable"

eif_check

aliases: eif-check

string

Enable/Disable check endpoint-independent-filtering pinhole.

Choices:

  • "disable"

  • "enable"

eif_learn

aliases: eif-learn

string

Enable/Disable learning of end-point-independent filtering pinhole.

Choices:

  • "disable"

  • "enable"

email_collect

aliases: email-collect

string

Enable/disable email collection.

Choices:

  • "disable"

  • "enable"

emailfilter_profile

aliases: emailfilter-profile

string

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

aliases: file-filter-profile

string

Name of an existing file-filter profile.

firewall_session_dirty

aliases: firewall-session-dirty

string

How to handle sessions if the configuration of this firewall policy changes.

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

aliases: fsso-agent-for-ntlm

string

FSSO agent to use for NTLM authentication.

fsso_groups

aliases: fsso-groups

any

(list) Names of FSSO groups.

geoip_anycast

aliases: geoip-anycast

string

Enable/disable recognition of anycast IP addresses using the geography IP database.

Choices:

  • "disable"

  • "enable"

geoip_match

aliases: geoip-match

string

Match geography address based either on its physical location or registered location.

Choices:

  • "physical-location"

  • "registered-location"

global_label

aliases: global-label

string

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

groups

any

(list) Names of user groups that can authenticate with this policy.

gtp_profile

aliases: gtp-profile

string

GTP profile.

http_policy_redirect

aliases: http-policy-redirect

string

Redirect HTTP

Choices:

  • "disable"

  • "enable"

icap_profile

aliases: icap-profile

string

Name of an existing ICAP profile.

identity_based_route

aliases: identity-based-route

string

Name of identity-based routing rule.

inbound

string

Policy-based IPsec VPN

Choices:

  • "disable"

  • "enable"

inspection_mode

aliases: inspection-mode

string

Policy inspection mode

Choices:

  • "proxy"

  • "flow"

internet_service

aliases: internet-service

string

Enable/disable use of Internet Services for this policy.

Choices:

  • "disable"

  • "enable"

internet_service6

aliases: internet-service6

string

Enable/disable use of IPv6 Internet Services for this policy.

Choices:

  • "disable"

  • "enable"

internet_service6_custom

aliases: internet-service6-custom

any

(list) Custom IPv6 Internet Service name.

internet_service6_custom_group

aliases: internet-service6-custom-group

any

(list) Custom Internet Service6 group name.

internet_service6_group

aliases: internet-service6-group

any

(list) Internet Service group name.

internet_service6_name

aliases: internet-service6-name

any

(list) IPv6 Internet Service name.

internet_service6_negate

aliases: internet-service6-negate

string

When enabled internet-service6 specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

internet_service6_src

aliases: internet-service6-src

string

Enable/disable use of IPv6 Internet Services in source for this policy.

Choices:

  • "disable"

  • "enable"

internet_service6_src_custom

aliases: internet-service6-src-custom

any

(list) Custom IPv6 Internet Service source name.

internet_service6_src_custom_group

aliases: internet-service6-src-custom-group

any

(list) Custom Internet Service6 source group name.

internet_service6_src_group

aliases: internet-service6-src-group

any

(list) Internet Service6 source group name.

internet_service6_src_name

aliases: internet-service6-src-name

any

(list) IPv6 Internet Service source name.

internet_service6_src_negate

aliases: internet-service6-src-negate

string

When enabled internet-service6-src specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

internet_service_custom

aliases: internet-service-custom

any

(list) Custom Internet Service name.

internet_service_custom_group

aliases: internet-service-custom-group

any

(list) Custom Internet Service group name.

internet_service_group

aliases: internet-service-group

any

(list) Internet Service group name.

internet_service_id

aliases: internet-service-id

any

(list) Internet Service ID.

internet_service_name

aliases: internet-service-name

any

(list) Internet Service name.

internet_service_negate

aliases: internet-service-negate

string

When enabled internet-service specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

internet_service_src

aliases: internet-service-src

string

Enable/disable use of Internet Services in source for this policy.

Choices:

  • "disable"

  • "enable"

internet_service_src_custom

aliases: internet-service-src-custom

any

(list) Custom Internet Service source name.

internet_service_src_custom_group

aliases: internet-service-src-custom-group

any

(list) Custom Internet Service source group name.

internet_service_src_group

aliases: internet-service-src-group

any

(list) Internet Service source group name.

internet_service_src_id

aliases: internet-service-src-id

any

(list) Internet Service source ID.

internet_service_src_name

aliases: internet-service-src-name

any

(list) Internet Service source name.

internet_service_src_negate

aliases: internet-service-src-negate

string

When enabled internet-service-src specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

ip_version_type

aliases: ip-version-type

string

IP version of the policy.

ippool

string

Enable to use IP Pools for source NAT.

Choices:

  • "disable"

  • "enable"

ips_sensor

aliases: ips-sensor

string

Name of an existing IPS sensor.

ips_voip_filter

aliases: ips-voip-filter

string

Name of an existing VoIP

label

string

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

learning_mode

aliases: learning-mode

string

Enable to allow everything, but log all of the meaningful data for security information gathering.

Choices:

  • "disable"

  • "enable"

log_http_transaction

aliases: log-http-transaction

string

Enable/disable HTTP transaction log.

Choices:

  • "disable"

  • "enable"

  • "all"

  • "utm"

logtraffic

string

Enable or disable logging.

Choices:

  • "disable"

  • "enable"

  • "all"

  • "utm"

logtraffic_start

aliases: logtraffic-start

string

Record logs when a session starts.

Choices:

  • "disable"

  • "enable"

match_vip

aliases: match-vip

string

Enable to match packets that have had their destination addresses changed by a VIP.

Choices:

  • "disable"

  • "enable"

match_vip_only

aliases: match-vip-only

string

Enable/disable matching of only those packets that have had their destination addresses changed by a VIP.

Choices:

  • "disable"

  • "enable"

mms_profile

aliases: mms-profile

string

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

aliases: network-service-dynamic

any

(list) Dynamic Network Service name.

network_service_src_dynamic

aliases: network-service-src-dynamic

any

(list) Dynamic Network Service source name.

np_acceleration

aliases: np-acceleration

string

Enable/disable UTM Network Processor acceleration.

Choices:

  • "disable"

  • "enable"

ntlm

string

Enable/disable NTLM authentication.

Choices:

  • "disable"

  • "enable"

ntlm_enabled_browsers

aliases: ntlm-enabled-browsers

any

(list) HTTP-User-Agent value of supported browsers.

ntlm_guest

aliases: ntlm-guest

string

Enable/disable NTLM guest user access.

Choices:

  • "disable"

  • "enable"

outbound

string

Policy-based IPsec VPN

Choices:

  • "disable"

  • "enable"

passive_wan_health_measurement

aliases: passive-wan-health-measurement

string

Enable/disable passive WAN health measurement.

Choices:

  • "disable"

  • "enable"

pcp_inbound

aliases: pcp-inbound

string

Enable/disable PCP inbound DNAT.

Choices:

  • "disable"

  • "enable"

pcp_outbound

aliases: pcp-outbound

string

Enable/disable PCP outbound SNAT.

Choices:

  • "disable"

  • "enable"

pcp_poolname

aliases: pcp-poolname

any

(list) PCP pool names.

per_ip_shaper

aliases: per-ip-shaper

string

Per-IP traffic shaper.

permit_any_host

aliases: permit-any-host

string

Accept UDP packets from any host.

Choices:

  • "disable"

  • "enable"

permit_stun_host

aliases: permit-stun-host

string

Accept UDP packets from any Session Traversal Utilities for NAT

Choices:

  • "disable"

  • "enable"

pfcp_profile

aliases: pfcp-profile

string

PFCP profile.

policy_behaviour_type

aliases: policy-behaviour-type

string

Behaviour of the policy.

policy_expiry

aliases: policy-expiry

string

Enable/disable policy expiry.

Choices:

  • "disable"

  • "enable"

policy_expiry_date

aliases: policy-expiry-date

string

Policy expiry date

policy_expiry_date_utc

aliases: policy-expiry-date-utc

string

Policy expiry date and time, in epoch format.

policy_offload

aliases: policy-offload

string

Enable/Disable hardware session setup for CGNAT.

Choices:

  • "disable"

  • "enable"

policyid

integer / required

Policy ID

poolname

any

(list) IP Pool names.

poolname6

any

(list) IPv6 pool names.

port_preserve

aliases: port-preserve

string

Enable/disable preservation of the original source port from source NAT if it has not been used.

Choices:

  • "disable"

  • "enable"

profile_group

aliases: profile-group

string

Name of profile group.

profile_protocol_options

aliases: profile-protocol-options

string

Name of an existing Protocol options profile.

profile_type

aliases: profile-type

string

Determine whether the firewall policy allows security profile groups or single profiles only.

Choices:

  • "single"

  • "group"

radius_ip_auth_bypass

aliases: radius-ip-auth-bypass

string

Enable IP authentication bypass.

Choices:

  • "disable"

  • "enable"

radius_mac_auth_bypass

aliases: radius-mac-auth-bypass

string

Enable MAC authentication bypass.

Choices:

  • "disable"

  • "enable"

redirect_url

aliases: redirect-url

string

URL users are directed to after seeing and accepting the disclaimer or authenticating.

replacemsg_override_group

aliases: replacemsg-override-group

string

Override the default replacement message group for this policy.

reputation_direction

aliases: reputation-direction

string

Direction of the initial traffic for reputation to take effect.

Choices:

  • "source"

  • "destination"

reputation_direction6

aliases: reputation-direction6

string

Direction of the initial traffic for IPv6 reputation to take effect.

Choices:

  • "source"

  • "destination"

reputation_minimum

aliases: reputation-minimum

integer

Minimum Reputation to take action.

reputation_minimum6

aliases: reputation-minimum6

integer

IPv6 Minimum Reputation to take action.

rsso

string

Enable/disable RADIUS single sign-on

Choices:

  • "disable"

  • "enable"

rtp_addr

aliases: rtp-addr

any

(list) Address names if this is an RTP NAT policy.

rtp_nat

aliases: rtp-nat

string

Enable Real Time Protocol

Choices:

  • "disable"

  • "enable"

scan_botnet_connections

aliases: scan-botnet-connections

string

Block or monitor connections to Botnet servers or disable Botnet scanning.

Choices:

  • "disable"

  • "block"

  • "monitor"

schedule

string

Schedule name.

schedule_timeout

aliases: schedule-timeout

string

Enable to force current sessions to end when the schedule object times out.

Choices:

  • "disable"

  • "enable"

sctp_filter_profile

aliases: sctp-filter-profile

string

Name of an existing SCTP filter profile.

send_deny_packet

aliases: send-deny-packet

string

Enable to send a reply when a session is denied or blocked by a firewall policy.

Choices:

  • "disable"

  • "enable"

service

any

(list) Service and service group names.

service_negate

aliases: service-negate

string

When enabled service specifies what the service must NOT be.

Choices:

  • "disable"

  • "enable"

session_ttl

aliases: session-ttl

any

(int or str) TTL in seconds for sessions accepted by this policy

sgt

any

(list) Security group tags.

sgt_check

aliases: sgt-check

string

Enable/disable security group tags

Choices:

  • "disable"

  • "enable"

spamfilter_profile

aliases: spamfilter-profile

string

Name of an existing Spam filter profile.

src_vendor_mac

aliases: src-vendor-mac

any

(list) Vendor MAC source ID.

srcaddr

any

(list) Source IPv4 address and address group names.

srcaddr6

any

(list) Source IPv6 address name and address group names.

srcaddr6_negate

aliases: srcaddr6-negate

string

When enabled srcaddr6 specifies what the source address must NOT be.

Choices:

  • "disable"

  • "enable"

srcaddr_negate

aliases: srcaddr-negate

string

When enabled srcaddr/srcaddr6 specifies what the source address must NOT be.

Choices:

  • "disable"

  • "enable"

srcintf

any

(list) Incoming

ssh_filter_profile

aliases: ssh-filter-profile

string

Name of an existing SSH filter profile.

ssh_policy_redirect

aliases: ssh-policy-redirect

string

Redirect SSH traffic to matching transparent proxy policy.

Choices:

  • "disable"

  • "enable"

ssl_mirror

aliases: ssl-mirror

string

Enable to copy decrypted SSL traffic to a FortiGate interface

Choices:

  • "disable"

  • "enable"

ssl_mirror_intf

aliases: ssl-mirror-intf

any

(list) SSL mirror interface name.

ssl_ssh_profile

aliases: ssl-ssh-profile

string

Name of an existing SSL SSH profile.

status

string

Enable or disable this policy.

Choices:

  • "disable"

  • "enable"

tcp_mss_receiver

aliases: tcp-mss-receiver

integer

Receiver TCP maximum segment size

tcp_mss_sender

aliases: tcp-mss-sender

integer

Sender TCP maximum segment size

tcp_session_without_syn

aliases: tcp-session-without-syn

string

Enable/disable creation of TCP session without SYN flag.

Choices:

  • "all"

  • "data-only"

  • "disable"

tcp_timeout_pid

aliases: tcp-timeout-pid

string

TCP timeout profile ID

timeout_send_rst

aliases: timeout-send-rst

string

Enable/disable sending RST packets when TCP sessions expire.

Choices:

  • "disable"

  • "enable"

tos

string

ToS

tos_mask

aliases: tos-mask

string

Non-zero bit positions are used for comparison while zero bit positions are ignored.

tos_negate

aliases: tos-negate

string

Enable negated TOS match.

Choices:

  • "disable"

  • "enable"

traffic_shaper

aliases: traffic-shaper

string

Traffic shaper.

traffic_shaper_reverse

aliases: traffic-shaper-reverse

string

Reverse traffic shaper.

udp_timeout_pid

aliases: udp-timeout-pid

string

UDP timeout profile ID

url_category

aliases: url-category

any

(list) URL category ID list.

users

any

(list) Names of individual users that can authenticate with this policy.

utm_status

aliases: utm-status

string

Enable to add one or more security profiles

Choices:

  • "disable"

  • "enable"

uuid

string

Universally Unique Identifier

videofilter_profile

aliases: videofilter-profile

string

Name of an existing VideoFilter profile.

virtual_patch_profile

aliases: virtual-patch-profile

string

Name of an existing virtual-patch profile.

vlan_cos_fwd

aliases: vlan-cos-fwd

integer

VLAN forward direction user priority

vlan_cos_rev

aliases: vlan-cos-rev

integer

VLAN reverse direction user priority

vlan_filter

aliases: vlan-filter

string

Set VLAN filters.

voip_profile

aliases: voip-profile

string

Name of an existing VoIP profile.

vpntunnel

string

Policy-based IPsec VPN

waf_profile

aliases: waf-profile

string

Name of an existing Web application firewall profile.

wanopt

string

Enable/disable WAN optimization.

Choices:

  • "disable"

  • "enable"

wanopt_detection

aliases: wanopt-detection

string

WAN optimization auto-detection mode.

Choices:

  • "active"

  • "passive"

  • "off"

wanopt_passive_opt

aliases: wanopt-passive-opt

string

WAN optimization passive mode options.

Choices:

  • "default"

  • "transparent"

  • "non-transparent"

wanopt_peer

aliases: wanopt-peer

string

WAN optimization peer.

wanopt_profile

aliases: wanopt-profile

string

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

aliases: webcache-https

string

Enable/disable web cache for HTTPS.

Choices:

  • "disable"

  • "ssl-server"

  • "any"

  • "enable"

webfilter_profile

aliases: webfilter-profile

string

Name of an existing Web filter profile.

webproxy_forward_server

aliases: webproxy-forward-server

string

Webproxy forward server name.

webproxy_profile

aliases: webproxy-profile

string

Webproxy profile name.

wsso

string

Enable/disable WiFi Single Sign On

Choices:

  • "disable"

  • "enable"

ztna_device_ownership

aliases: ztna-device-ownership

string

Enable/disable zero trust device ownership.

Choices:

  • "disable"

  • "enable"

ztna_ems_tag

aliases: ztna-ems-tag

any

(list) Source ztna-ems-tag names.

ztna_ems_tag_secondary

aliases: ztna-ems-tag-secondary

any

(list) Source ztna-ems-tag-secondary names.

ztna_geo_tag

aliases: ztna-geo-tag

any

(list) Source ztna-geo-tag names.

ztna_policy_redirect

aliases: ztna-policy-redirect

string

Redirect ZTNA traffic to matching Access-Proxy proxy-policy.

Choices:

  • "disable"

  • "enable"

ztna_status

aliases: ztna-status

string

Enable/disable zero trust access.

Choices:

  • "disable"

  • "enable"

ztna_tags_match_logic

aliases: ztna-tags-match-logic

string

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>
          port_preserve: <value in [disable, enable]>
          cgn_sw_eif_ctrl: <value in [disable, enable]>
          eif_check: <value in [disable, enable]>
          eif_learn: <value in [disable, enable]>
          log_http_transaction: <value in [disable, enable, all, ...]>
          radius_ip_auth_bypass: <value in [disable, enable]>

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)