fmgr_pkg_header_policy – Configure IPv4/IPv6 policies.

New in version 2.0.0.

Synopsis

  • This module is able to configure a FortiManager device.
  • Examples include all parameters and values need to be adjusted to data sources before usage.
  • Tested with FortiManager v6.x and v7.x.

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

FortiManager Version Compatibility


6.0.0
True
6.2.0 6.2.1 6.2.2 6.2.3 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.2.10 6.2.11
True True True True True True True True True True True
6.4.0 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 6.4.6 6.4.7 6.4.8 6.4.9 6.4.10 6.4.11 6.4.12
True True True True True True True True True True True True True
7.0.0 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7 7.0.8
True True True True True True True True True
7.2.0 7.2.1 7.2.2 7.2.3
True True True True
7.4.0
True

Parameters

  • access_token -The token to access FortiManager without using username and password. type: str required: false
  • bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
  • enable_log - Enable/Disable logging for task. type: bool required: false default: False
  • forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
  • proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
  • rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
  • rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
  • state - The directive to create, update or delete an object type: str required: true choices: present, absent
  • workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
  • workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
  • pkg - The parameter in requested url type: str required: true
  • pkg_header_policy - Configure IPv4/IPv6 policies. type: dict
    • action - No description for the parameter type: str choices: [deny, accept, ipsec, ssl-vpn, redirect, isolate] more...
    • active-auth-method - No description for the parameter type: str choices: [ntlm, basic, digest, form] more...
    • anti-replay - No description for the parameter type: str choices: [disable, enable] more...
    • app-category - No description for the parameter type: str more...
    • app-group - No description for the parameter type: str more...
    • application - No description for the parameter type: int more...
    • application-charts - No description for the parameter type: array choices: [top10-app, top10-p2p-user, top10-media-user] more...
    • application-list - No description for the parameter type: str more...
    • auth-cert - No description for the parameter type: str more...
    • auth-method - No description for the parameter type: str choices: [basic, digest, ntlm, fsae, form, fsso, rsso] more...
    • auth-path - No description for the parameter type: str choices: [disable, enable] more...
    • auth-portal - No description for the parameter type: str choices: [disable, enable] more...
    • auth-redirect-addr - No description for the parameter type: str more...
    • auto-asic-offload - No description for the parameter type: str choices: [disable, enable] more...
    • av-profile - No description for the parameter type: str more...
    • bandwidth - No description for the parameter type: str choices: [disable, enable] more...
    • block-notification - No description for the parameter type: str choices: [disable, enable] more...
    • captive-portal-exempt - No description for the parameter type: str choices: [disable, enable] more...
    • capture-packet - No description for the parameter type: str choices: [disable, enable] more...
    • casi-profile - No description for the parameter type: str more...
    • central-nat - No description for the parameter type: str choices: [disable, enable] more...
    • cifs-profile - No description for the parameter type: str more...
    • client-reputation - No description for the parameter type: str choices: [disable, enable] more...
    • client-reputation-mode - No description for the parameter type: str choices: [learning, monitoring] more...
    • comments - No description for the parameter type: str
    • custom-log-fields - No description for the parameter type: str more...
    • deep-inspection-options - No description for the parameter type: str more...
    • delay-tcp-npu-session - No description for the parameter type: str choices: [disable, enable] more...
    • delay-tcp-npu-sessoin - No description for the parameter type: str choices: [disable, enable] more...
    • device-detection-portal - No description for the parameter type: str choices: [disable, enable] more...
    • devices - No description for the parameter type: str more...
    • diffserv-forward - No description for the parameter type: str choices: [disable, enable] more...
    • diffserv-reverse - No description for the parameter type: str choices: [disable, enable] more...
    • diffservcode-forward - No description for the parameter type: str more...
    • diffservcode-rev - No description for the parameter type: str more...
    • disclaimer - No description for the parameter type: str choices: [disable, enable, user, domain, policy] more...
    • dlp-sensor - No description for the parameter type: str more...
    • dnsfilter-profile - No description for the parameter type: str more...
    • dponly - No description for the parameter type: str choices: [disable, enable] more...
    • dscp-match - No description for the parameter type: str choices: [disable, enable] more...
    • dscp-negate - No description for the parameter type: str choices: [disable, enable] more...
    • dscp-value - No description for the parameter type: str more...
    • dsri - No description for the parameter type: str choices: [disable, enable] more...
    • dstaddr - No description for the parameter type: str more...
    • dstaddr-negate - No description for the parameter type: str choices: [disable, enable] more...
    • dstaddr6 - No description for the parameter type: str more...
    • dstintf - No description for the parameter type: str more...
    • dynamic-profile - No description for the parameter type: str choices: [disable, enable] more...
    • dynamic-profile-access - No description for the parameter type: array choices: [imap, smtp, pop3, http, ftp, im, nntp, imaps, smtps, pop3s, https, ftps, ssh] more...
    • dynamic-profile-fallthrough - No description for the parameter type: str choices: [disable, enable] more...
    • dynamic-profile-group - No description for the parameter type: str more...
    • email-collect - No description for the parameter type: str choices: [disable, enable] more...
    • email-collection-portal - No description for the parameter type: str choices: [disable, enable] more...
    • emailfilter-profile - No description for the parameter type: str more...
    • endpoint-check - No description for the parameter type: str choices: [disable, enable] more...
    • endpoint-compliance - No description for the parameter type: str choices: [disable, enable] more...
    • endpoint-keepalive-interface - No description for the parameter type: str more...
    • endpoint-profile - No description for the parameter type: str more...
    • failed-connection - No description for the parameter type: str choices: [disable, enable] more...
    • fall-through-unauthenticated - No description for the parameter type: str choices: [disable, enable] more...
    • firewall-session-dirty - No description for the parameter type: str choices: [check-all, check-new] more...
    • fixedport - No description for the parameter type: str choices: [disable, enable] more...
    • forticlient-compliance-devices - No description for the parameter type: array choices: [windows-pc, mac, iphone-ipad, android] more...
    • forticlient-compliance-enforcement-portal - No description for the parameter type: str choices: [disable, enable] more...
    • fsae - No description for the parameter type: str choices: [disable, enable] more...
    • fsae-server-for-ntlm - No description for the parameter type: str more...
    • fsso - No description for the parameter type: str choices: [disable, enable] more...
    • fsso-agent-for-ntlm - No description for the parameter type: str more...
    • geo-location - No description for the parameter type: str choices: [disable, enable] more...
    • geoip-anycast - No description for the parameter type: str choices: [disable, enable] more...
    • global-label - No description for the parameter type: str more...
    • groups - No description for the parameter type: str more...
    • gtp-profile - No description for the parameter type: str more...
    • http-policy-redirect - No description for the parameter type: str choices: [disable, enable] more...
    • icap-profile - No description for the parameter type: str more...
    • identity-based - No description for the parameter type: str choices: [disable, enable] more...
    • identity-based-policy - No description for the parameter type: array more...
      • action - No description for the parameter type: str choices: [deny, accept] more...
      • application-charts - No description for the parameter type: array choices: [top10-app, top10-p2p-user, top10-media-user] more...
      • application-list - No description for the parameter type: str more...
      • av-profile - No description for the parameter type: str more...
      • capture-packet - No description for the parameter type: str choices: [disable, enable] more...
      • deep-inspection-options - No description for the parameter type: str more...
      • devices - No description for the parameter type: str more...
      • dlp-sensor - No description for the parameter type: str more...
      • dstaddr - No description for the parameter type: str more...
      • dstaddr-negate - No description for the parameter type: str choices: [disable, enable] more...
      • endpoint-compliance - No description for the parameter type: str choices: [disable, enable] more...
      • groups - No description for the parameter type: str more...
      • icap-profile - No description for the parameter type: str more...
      • id - No description for the parameter type: int more...
      • ips-sensor - No description for the parameter type: str more...
      • logtraffic - No description for the parameter type: str choices: [disable, enable, all, utm] more...
      • logtraffic-app - No description for the parameter type: str choices: [disable, enable] more...
      • logtraffic-start - No description for the parameter type: str choices: [disable, enable] more...
      • mms-profile - No description for the parameter type: str more...
      • per-ip-shaper - No description for the parameter type: str more...
      • profile-group - No description for the parameter type: str more...
      • profile-protocol-options - No description for the parameter type: str more...
      • profile-type - No description for the parameter type: str choices: [single, group] more...
      • replacemsg-group - No description for the parameter type: str more...
      • schedule - No description for the parameter type: str more...
      • send-deny-packet - No description for the parameter type: str choices: [disable, enable] more...
      • service - No description for the parameter type: str more...
      • service-negate - No description for the parameter type: str choices: [disable, enable] more...
      • spamfilter-profile - No description for the parameter type: str more...
      • sslvpn-portal - No description for the parameter type: str more...
      • sslvpn-realm - No description for the parameter type: str more...
      • traffic-shaper - No description for the parameter type: str more...
      • traffic-shaper-reverse - No description for the parameter type: str more...
      • users - No description for the parameter type: str more...
      • utm-status - No description for the parameter type: str choices: [disable, enable] more...
      • voip-profile - No description for the parameter type: str more...
      • webfilter-profile - No description for the parameter type: str more...
    • identity-based-route - No description for the parameter type: str more...
    • identity-from - No description for the parameter type: str choices: [auth, device] more...
    • inbound - No description for the parameter type: str choices: [disable, enable] more...
    • inspection-mode - No description for the parameter type: str choices: [proxy, flow] more...
    • internet-service - No description for the parameter type: str choices: [disable, enable] more...
    • internet-service-custom - No description for the parameter type: str more...
    • internet-service-custom-group - No description for the parameter type: str more...
    • internet-service-group - No description for the parameter type: str more...
    • internet-service-id - No description for the parameter type: str more...
    • internet-service-negate - No description for the parameter type: str choices: [disable, enable] more...
    • internet-service-src - No description for the parameter type: str choices: [disable, enable] more...
    • internet-service-src-custom - No description for the parameter type: str more...
    • internet-service-src-custom-group - No description for the parameter type: str more...
    • internet-service-src-group - No description for the parameter type: str more...
    • internet-service-src-id - No description for the parameter type: str more...
    • internet-service-src-negate - No description for the parameter type: str choices: [disable, enable] more...
    • ip-based - No description for the parameter type: str choices: [disable, enable] more...
    • ippool - No description for the parameter type: str choices: [disable, enable] more...
    • ips-sensor - No description for the parameter type: str more...
    • label - No description for the parameter type: str more...
    • learning-mode - No description for the parameter type: str choices: [disable, enable] more...
    • log-unmatched-traffic - No description for the parameter type: str choices: [disable, enable] more...
    • logtraffic - No description for the parameter type: str choices: [disable, enable, all, utm] more...
    • logtraffic-app - No description for the parameter type: str choices: [disable, enable] more...
    • logtraffic-start - No description for the parameter type: str choices: [disable, enable] more...
    • match-vip - No description for the parameter type: str choices: [disable, enable] more...
    • mms-profile - No description for the parameter type: str more...
    • name - No description for the parameter type: str more...
    • nat - No description for the parameter type: str choices: [disable, enable] more...
    • natinbound - No description for the parameter type: str choices: [disable, enable] more...
    • natip - No description for the parameter type: str more...
    • natoutbound - No description for the parameter type: str choices: [disable, enable] more...
    • np-acceleration - No description for the parameter type: str choices: [disable, enable] more...
    • ntlm - No description for the parameter type: str choices: [disable, enable] more...
    • ntlm-enabled-browsers - No description for the parameter type: str more...
    • ntlm-guest - No description for the parameter type: str choices: [disable, enable] more...
    • outbound - No description for the parameter type: str choices: [disable, enable] more...
    • per-ip-shaper - No description for the parameter type: str more...
    • permit-any-host - No description for the parameter type: str choices: [disable, enable] more...
    • permit-stun-host - No description for the parameter type: str choices: [disable, enable] more...
    • policyid - No description for the parameter type: int more...
    • poolname - No description for the parameter type: str more...
    • profile-group - No description for the parameter type: str more...
    • profile-protocol-options - No description for the parameter type: str more...
    • profile-type - No description for the parameter type: str choices: [single, group] more...
    • radius-mac-auth-bypass - No description for the parameter type: str choices: [disable, enable] more...
    • redirect-url - No description for the parameter type: str more...
    • replacemsg-group - No description for the parameter type: str more...
    • replacemsg-override-group - No description for the parameter type: str more...
    • reputation-direction - No description for the parameter type: str choices: [source, destination] more...
    • reputation-minimum - No description for the parameter type: int more...
    • require-tfa - No description for the parameter type: str choices: [disable, enable] more...
    • rsso - No description for the parameter type: str choices: [disable, enable] more...
    • rtp-addr - No description for the parameter type: str more...
    • rtp-nat - No description for the parameter type: str choices: [disable, enable] more...
    • scan-botnet-connections - No description for the parameter type: str choices: [disable, block, monitor] more...
    • schedule - No description for the parameter type: str more...
    • schedule-timeout - No description for the parameter type: str choices: [disable, enable] more...
    • send-deny-packet - No description for the parameter type: str choices: [disable, enable] more...
    • service - No description for the parameter type: str more...
    • service-negate - No description for the parameter type: str choices: [disable, enable] more...
    • session-ttl - No description for the parameter type: int more...
    • sessions - No description for the parameter type: str choices: [disable, enable] more...
    • spamfilter-profile - No description for the parameter type: str more...
    • srcaddr - No description for the parameter type: str more...
    • srcaddr-negate - No description for the parameter type: str choices: [disable, enable] more...
    • srcaddr6 - No description for the parameter type: str more...
    • srcintf - No description for the parameter type: str more...
    • ssh-filter-profile - No description for the parameter type: str more...
    • ssh-policy-redirect - No description for the parameter type: str choices: [disable, enable] more...
    • ssl-mirror - No description for the parameter type: str choices: [disable, enable] more...
    • ssl-mirror-intf - No description for the parameter type: str more...
    • ssl-ssh-profile - No description for the parameter type: str more...
    • sslvpn-auth - No description for the parameter type: str choices: [any, local, radius, ldap, tacacs+] more...
    • sslvpn-ccert - No description for the parameter type: str choices: [disable, enable] more...
    • sslvpn-cipher - No description for the parameter type: str choices: [any, high, medium] more...
    • sso-auth-method - No description for the parameter type: str choices: [fsso, rsso] more...
    • status - No description for the parameter type: str choices: [disable, enable] more...
    • tags - No description for the parameter type: str more...
    • tcp-mss-receiver - No description for the parameter type: int more...
    • tcp-mss-sender - No description for the parameter type: int more...
    • tcp-reset - No description for the parameter type: str choices: [disable, enable] more...
    • tcp-session-without-syn - No description for the parameter type: str choices: [all, data-only, disable] more...
    • timeout-send-rst - No description for the parameter type: str choices: [disable, enable] more...
    • tos - No description for the parameter type: str more...
    • tos-mask - No description for the parameter type: str more...
    • tos-negate - No description for the parameter type: str choices: [disable, enable] more...
    • traffic-shaper - No description for the parameter type: str more...
    • traffic-shaper-reverse - No description for the parameter type: str more...
    • transaction-based - No description for the parameter type: str choices: [disable, enable] more...
    • url-category - No description for the parameter type: str more...
    • users - No description for the parameter type: str more...
    • utm-inspection-mode - No description for the parameter type: str choices: [proxy, flow] more...
    • utm-status - No description for the parameter type: str choices: [disable, enable] more...
    • uuid - No description for the parameter type: str more...
    • vlan-cos-fwd - No description for the parameter type: int more...
    • vlan-cos-rev - No description for the parameter type: int more...
    • vlan-filter - No description for the parameter type: str more...
    • voip-profile - No description for the parameter type: str more...
    • vpntunnel - No description for the parameter type: str more...
    • waf-profile - No description for the parameter type: str more...
    • wanopt - No description for the parameter type: str choices: [disable, enable] more...
    • wanopt-detection - No description for the parameter type: str choices: [active, passive, off] more...
    • wanopt-passive-opt - No description for the parameter type: str choices: [default, transparent, non-transparent] more...
    • wanopt-peer - No description for the parameter type: str more...
    • wanopt-profile - No description for the parameter type: str more...
    • wccp - No description for the parameter type: str choices: [disable, enable] more...
    • web-auth-cookie - No description for the parameter type: str choices: [disable, enable] more...
    • webcache - No description for the parameter type: str choices: [disable, enable] more...
    • webcache-https - No description for the parameter type: str choices: [disable, ssl-server, any, enable] more...
    • webfilter-profile - No description for the parameter type: str more...
    • webproxy-forward-server - No description for the parameter type: str more...
    • webproxy-profile - No description for the parameter type: str more...
    • wsso - No description for the parameter type: str choices: [disable, enable] more...
    • fsso-groups - No description for the parameter type: str more...
    • match-vip-only - No description for the parameter type: str choices: [disable, enable] more...
    • np-accelation - No description for the parameter type: str choices: [disable, enable] more...
    • best-route - No description for the parameter type: str choices: [disable, enable] more...
    • decrypted-traffic-mirror - No description for the parameter type: str more...
    • geoip-match - No description for the parameter type: str choices: [physical-location, registered-location] more...
    • internet-service-name - No description for the parameter type: str more...
    • internet-service-src-name - No description for the parameter type: str more...
    • poolname6 - No description for the parameter type: str more...
    • src-vendor-mac - No description for the parameter type: str more...
    • vendor-mac - No description for the parameter type: str more...
    • file-filter-profile - No description for the parameter type: str more...
    • cgn-eif - Enable/Disable CGN endpoint independent filtering. type: str choices: [disable, enable] more...
    • cgn-eim - Enable/Disable CGN endpoint independent mapping type: str choices: [disable, enable] more...
    • cgn-log-server-grp - NP log server group name type: str more...
    • cgn-resource-quota - resource quota type: int more...
    • cgn-session-quota - session quota type: int more...
    • policy-offload - Enable/Disable hardware session setup for CGNAT. type: str choices: [disable, enable] more...
    • dynamic-shaping - Enable/disable dynamic RADIUS defined traffic shaping. type: str choices: [disable, enable] more...
    • passive-wan-health-measurement - Enable/disable passive WAN health measurement. type: str choices: [disable, enable] more...
    • videofilter-profile - Name of an existing VideoFilter profile. type: str more...
    • ztna-ems-tag - Source ztna-ems-tag names. type: str more...
    • ztna-geo-tag - Source ztna-geo-tag names. type: str more...
    • ztna-status - Enable/disable zero trust access. type: str choices: [disable, enable] more...
    • access-proxy - No description for the parameter type: str more...
    • dlp-profile - Name of an existing DLP profile. type: str more...
    • dynamic-bypass - No description for the parameter type: str choices: [disable, enable] more...
    • fec - Enable/disable Forward Error Correction on traffic matching this policy on a FEC device. type: str choices: [disable, enable] more...
    • force-proxy - No description for the parameter type: str choices: [disable, enable] more...
    • http-tunnel-auth - No description for the parameter type: str choices: [disable, enable] more...
    • ia-profile - No description for the parameter type: str more...
    • isolator-server - No description for the parameter type: str more...
    • log-http-transaction - No description for the parameter type: str choices: [disable, enable] more...
    • max-session-per-user - No description for the parameter type: int more...
    • nat46 - Enable/disable NAT46. type: str choices: [disable, enable] more...
    • nat64 - Enable/disable NAT64. type: str choices: [disable, enable] more...
    • pass-through - No description for the parameter type: str choices: [disable, enable] more...
    • pfcp-profile - PFCP profile. type: str more...
    • policy-expiry - Enable/disable policy expiry. type: str choices: [disable, enable] more...
    • policy-expiry-date - Policy expiry date (YYYY-MM-DD HH:MM:SS). type: str more...
    • reverse-cache - No description for the parameter type: str choices: [disable, enable] more...
    • sctp-filter-profile - Name of an existing SCTP filter profile. type: str more...
    • sgt - No description for the parameter type: int more...
    • sgt-check - Enable/disable security group tags (SGT) check. type: str choices: [disable, enable] more...
    • tcp-timeout-pid - No description for the parameter type: str more...
    • transparent - No description for the parameter type: str choices: [disable, enable] more...
    • type - No description for the parameter type: str choices: [explicit-web, transparent, explicit-ftp, ssh-tunnel, ssh, wanopt, access-proxy] more...
    • udp-timeout-pid - No description for the parameter type: str more...
    • ztna-tags-match-logic - No description for the parameter type: str choices: [or, and] more...
    • uuid-idx - No description for the parameter type: int more...
    • device-ownership - No description for the parameter type: str choices: [disable, enable] more...
    • ssh-policy-check - No description for the parameter type: str choices: [disable, enable] more...
    • diffserv-copy - Enable to copy packets DiffServ values from sessions original direction to its reply direction. type: str choices: [disable, enable] more...
    • dstaddr6-negate - When enabled dstaddr6 specifies what the destination address must NOT be. type: str choices: [disable, enable] more...
    • internet-service6 - Enable/disable use of IPv6 Internet Services for this policy. type: str choices: [disable, enable] more...
    • internet-service6-custom - No description for the parameter type: str more...
    • internet-service6-custom-group - No description for the parameter type: str more...
    • internet-service6-group - No description for the parameter type: str more...
    • internet-service6-name - No description for the parameter type: str more...
    • internet-service6-negate - When enabled internet-service6 specifies what the service must NOT be. type: str choices: [disable, enable] more...
    • internet-service6-src - Enable/disable use of IPv6 Internet Services in source for this policy. type: str choices: [disable, enable] more...
    • internet-service6-src-custom - No description for the parameter type: str more...
    • internet-service6-src-custom-group - No description for the parameter type: str more...
    • internet-service6-src-group - No description for the parameter type: str more...
    • internet-service6-src-name - No description for the parameter type: str more...
    • internet-service6-src-negate - When enabled internet-service6-src specifies what the service must NOT be. type: str choices: [disable, enable] more...
    • network-service-dynamic - No description for the parameter type: str more...
    • network-service-src-dynamic - No description for the parameter type: str more...
    • reputation-direction6 - Direction of the initial traffic for IPv6 reputation to take effect. type: str choices: [source, destination] more...
    • reputation-minimum6 - IPv6 Minimum Reputation to take action. type: int more...
    • srcaddr6-negate - When enabled srcaddr6 specifies what the source address must NOT be. type: str choices: [disable, enable] more...
    • _policy_block - Assigned policy block. type: int more...
    • isolator-profile - No description for the parameter type: str more...
    • policy-expiry-date-utc - Policy expiry date and time, in epoch format. type: str more...
    • ztna-device-ownership - Enable/disable zero trust device ownership. type: str choices: [disable, enable] more...
    • ztna-policy-redirect - Redirect ZTNA traffic to matching Access-Proxy proxy-policy. type: str choices: [disable, enable] more...
    • ip-version-type - IP version of the policy. type: str more...
    • ips-voip-filter - Name of an existing VoIP (ips) profile. type: str more...
    • policy-behaviour-type - Behaviour of the policy. type: str more...
    • pcp-inbound - Enable/disable PCP inbound DNAT. type: str choices: [disable, enable] more...
    • pcp-outbound - Enable/disable PCP outbound SNAT. type: str choices: [disable, enable] more...
    • pcp-poolname - No description for the parameter type: str more...
    • ztna-ems-tag-secondary - No description for the parameter type: str 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: fortimanager00
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:
   - name: Configure IPv4 header policies.
     fmgr_pkg_header_policy:
        bypass_validation: False
        pkg: ansible
        state: present
        pkg_header_policy:
           action: accept #<value in [deny, accept, ipsec, ...]>
           comments: 'ansible-comment'
           dstaddr: gall
           dstintf: any
           name: ansible-test-header
           policyid: 1073741826 # must larger than 2^30(1074741824), since header/footer policy is a special policy
           schedule: galways
           service: gALL
           srcaddr: gall
           srcintf: any
           status: disable

- name: gathering fortimanager facts
  hosts: fortimanager00
  gather_facts: no
  connection: httpapi
  collections:
    - fortinet.fortimanager
  vars:
    ansible_httpapi_use_ssl: True
    ansible_httpapi_validate_certs: False
    ansible_httpapi_port: 443
  tasks:
   - name: retrieve all the IPv4 header policies
     fmgr_fact:
       facts:
           selector: 'pkg_header_policy'
           params:
               pkg: 'ansible'
               policy: 'your_value'

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • meta - The result of the request.returned: always type: dict
    • request_url - The full url requested. returned: always type: str sample: /sys/login/user
    • response_code - The status of api request. returned: always type: int sample: 0
    • response_data - The data body of the api response. returned: optional type: list or dict
    • response_message - The descriptive message of the api response. returned: always type: str sample: OK
    • system_information - The information of the target system. returned: always type: dict
  • rc - The status the request. returned: always type: int 0
  • version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least on parameter mpt supported by the current FortiManager version type: list 0

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Xinwei Du (@dux-fortinet)
  • Xing Li (@lix-fortinet)
  • Jie Xue (@JieX19)
  • Link Zheng (@chillancezen)
  • Frank Shen (@fshen01)
  • Hongbin Lu (@fgtdev-hblu)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.