check_point.mgmt.cp_mgmt_firewall_best_practice module – Manages firewall-best-practice objects on Checkpoint over Web Services API
Note
This module is part of the check_point.mgmt collection (version 7.0.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 check_point.mgmt.
To use it in a playbook, specify: check_point.mgmt.cp_mgmt_firewall_best_practice.
New in check_point.mgmt 7.0.0
Synopsis
Manages firewall-best-practice objects on Checkpoint devices including creating, updating and removing objects.
All operations are performed over Web Services API.
Available from R82.20 management version.
Parameters
Parameter |
Comments |
|---|---|
To comply with Best Practice, do this action item. |
|
Publish the current session if changes have been performed after task completes. Choices:
|
|
Best Practice ID. |
|
Description of the Best Practice. |
|
The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object. Choices:
|
|
The activation status of the best practice. Choices:
|
|
Deactivation expiration settings.<br><font color=”red”>Required only if</font> enabled is set to false. |
|
The reason for deactivating the best practice. |
|
When the deactivation expires. Date and time represented in international ISO 8601 format. Relevant only if mode is set to ‘expire-on’. |
|
Whether the deactivation never expires or expires on a specific date. Choices:
|
|
Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Choices:
|
|
Apply changes ignoring warnings. Choices:
|
|
Best Practice Name. |
|
The percentage of the Rule Base to scan (0-100). |
|
The direction of the scan. Choices:
|
|
Visibility of poor-result rules in the Relevant Objects pane. Choices:
|
|
The rule criteria the firewall best practice evaluates against the rule base. Multi-set semantics on all match-list fields except name and comment. |
|
Rule actions to match. |
|
Match the rule comment against a text condition. |
|
The condition type. Choices:
|
|
The condition match string. Relevant only when the value of the ‘condition-type’ parameter is, ‘Equals’, ‘Starts with’, ‘Ends with’, ‘Contains’. |
|
Network objects to match in the rule Destination column. Identified by name or UID. |
|
Hit-count levels to match. |
|
Security Gateways or Clusters the rule applies to. Identified by name or UID. |
|
Match the rule name against a text condition. |
|
The condition type. Choices:
|
|
The condition match string. Relevant only when the value of the ‘condition-type’ parameter is, ‘Equals’, ‘Starts with’, ‘Ends with’, ‘Contains’. |
|
Shows if the action values are negated. Choices:
|
|
Shows if the destination values are negated. Choices:
|
|
Shows if the hit-count values are negated. Choices:
|
|
Shows if the install-on values are negated. Choices:
|
|
Shows if the services and applications values are negated. Choices:
|
|
Shows if the source values are negated. Choices:
|
|
Shows if the time values are negated. Choices:
|
|
Shows if the track values are negated. Choices:
|
|
Shows if the vpn values are negated. Choices:
|
|
Services, applications, categories or sites to match. Identified by name or UID. |
|
Network objects to match in the rule Source column. Identified by name or UID. |
|
Time objects the rule applies to. Identified by name or UID. |
|
Tracking methods to match. |
|
VPN communities to match. Identified by name or UID. |
|
Visibility of secure-result rules in the Relevant Objects pane. Choices:
|
|
State of the access rule (present or absent). Choices:
|
|
Number of matches allowed before a violation is created. Valid values, between 0 and 100.<br><font color=”red”>Required only if</font> violation-condition is set to ‘Rule found’. |
|
Version of checkpoint. If not given one, the latest version taken. |
|
Define when a violation occurs, ‘Rule found’ means the criteria match a rule; ‘Rule not found’ means no rule matches. Choices:
|
|
Wait for the task to end. Such as publish task. Choices:
|
|
How many minutes to wait until throwing a timeout error. Default: |
Examples
- name: add-firewall-best-practice
cp_mgmt_firewall_best_practice:
action_item: Define a clean-up rule at the end of the policy.
description: Checks that the rule base ends with a clean-up rule.
enabled: true
name: Clean-up rule defined in Access Policy
rule:
action:
- drop
destination:
- Any
hit_count:
- low
name_condition:
condition_type: contains
value: cleanup
source:
- Any
track:
- log
state: present
- name: set-firewall-best-practice
cp_mgmt_firewall_best_practice:
best_practice_id: FW001
enabled: false
expiration:
comment: Temporarily disabled pending policy review.
expire_on: '2026-12-31T14:30:00'
mode: expire-on
state: present
- name: delete-firewall-best-practice
cp_mgmt_firewall_best_practice:
best_practice_id: FW001
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The checkpoint object created or updated. Returned: always, except when deleting the object. |