fmgr_pkg_header_policy6 – Configure IPv6 policies.

New in version 2.10.

Synopsis

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

Requirements

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

  • ansible>=2.9.0

FortiManager Version Compatibility


6.0.0 6.2.1 6.2.3 6.2.5 6.4.0 6.4.2 6.4.5 7.0.0 7.2.0
pkg_header_policy6 yes yes yes yes yes yes yes yes yes

Parameters

  • enable_log - Enable/Disable logging for task type: bool required: false default: False
  • forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0 type: str required: false
  • proposed_method - The overridden method for the underlying Json RPC request type: str required: false choices: set, update, add
  • bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters type: bool required: false default: False
  • workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode type: str required: false choices: global, custom adom including root
  • workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
  • rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
  • rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
  • state - The directive to create, update or delete an object type: str required: true choices: present, absent
  • pkg - The parameter in requested url type: str required: true
  • pkg_header_policy6 - no description type: dict
    • action - No description for the parameter type: str choices: [deny, accept, ipsec, ssl-vpn] 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...
    • auto-asic-offload - No description for the parameter type: str choices: [disable, enable] more...
    • av-profile - No description for the parameter type: str more...
    • casi-profile - No description for the parameter type: str more...
    • cifs-profile - No description for the parameter type: str more...
    • comments - No description for the parameter type: str more...
    • custom-log-fields - No description for the parameter type: str more...
    • deep-inspection-options - No description for the parameter type: str 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...
    • dlp-sensor - No description for the parameter type: str more...
    • dnsfilter-profile - No description for the parameter type: str 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...
    • 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] more...
    • dynamic-profile-group - No description for the parameter type: str 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...
    • 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...
    • fsae - 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...
    • 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-policy6 - No description for the parameter type: array more...
      • action - No description for the parameter type: str choices: [deny, accept] more...
      • application-list - No description for the parameter type: str more...
      • av-profile - No description for the parameter type: str 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...
      • 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...
      • 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...
      • 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-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...
    • 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...
    • logtraffic - No description for the parameter type: str choices: [disable, enable, all, utm] more...
    • logtraffic-start - 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...
    • natoutbound - No description for the parameter type: str choices: [disable, enable] more...
    • np-accelation - No description for the parameter type: str choices: [disable, enable] more...
    • np-acceleration - 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...
    • 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...
    • replacemsg-group - No description for the parameter type: str more...
    • replacemsg-override-group - No description for the parameter type: str more...
    • rsso - No description for the parameter type: str choices: [disable, enable] 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...
    • session-ttl - No description for the parameter type: int 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...
    • 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...
    • 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-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...
    • 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...
    • webfilter-profile - No description for the parameter type: str more...
    • waf-profile - No description for the parameter type: str more...
    • webcache - No description for the parameter type: str choices: [disable, enable] more...
    • webcache-https - No description for the parameter type: str choices: [disable, enable] more...
    • webproxy-forward-server - No description for the parameter type: str more...
    • webproxy-profile - No description for the parameter type: str more...
    • fsso-groups - No description for the parameter type: str more...
    • decrypted-traffic-mirror - No description for the parameter type: str more...
    • file-filter-profile - No description for the parameter type: str more...
    • cgn-log-server-grp - No description for the parameter type: str more...
    • policy-offload - No description for the parameter type: str choices: [disable, enable] more...

Notes

Note

  • Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
  • To create or update an object, use state: present directive.
  • To delete an object, use state: absent directive
  • Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded

Examples

- 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 IPv6 header policies
     fmgr_fact:
       facts:
           selector: 'pkg_header_policy6'
           params:
               pkg: 'ansible'
               policy6: 'your_value'
- 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 IPv6 header policies.
     fmgr_pkg_header_policy6:
        bypass_validation: False
        pkg: ansible
        state: present
        pkg_header_policy6:
           action: accept #<value in [deny, accept, ipsec, ...]>
           comments: ansible-comment
           dstaddr: gall
           dstintf: any
           name: ansible-test2-header
           policyid: 1073741827 # must larger than 2^30(1074741824), since header/footer policy is a special policy
           schedule: galways
           service: gALL
           srcaddr: gall
           srcintf: any
           status: enable

Return Values

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

  • request_url - The full url requested returned: always type: str sample: /sys/login/user
  • response_code - The status of api request returned: always type: int sample: 0
  • response_message - The descriptive message of the api response returned: always type: str sample: OK
  • response_data - The data body of the api response returned: optional type: list or dict

Status

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

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • 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.