check_point.mgmt.cp_mgmt_smart_task module – Manages smart-task objects on Checkpoint over Web Services API
Note
This module is part of the check_point.mgmt collection (version 6.2.1).
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_smart_task
.
New in check_point.mgmt 5.0.0
Synopsis
Manages smart-task objects on Checkpoint devices including creating, updating and removing objects.
All operations are performed over Web Services API.
Parameters
Parameter |
Comments |
---|---|
The action to be run when the trigger is fired. |
|
When the trigger is fired, runs the configured Repository Script on the defined targets.<br>The trigger data is then passed to the script as the first parameter. The parameter is JSON encoded in Base64 format. |
|
Repository script that is executed when the trigger is fired., identified by the name or UID. |
|
Targets to execute the script on. |
|
Script execution time-out in seconds. |
|
When the trigger is fired, sends the configured email to the defined recipients. |
|
The required settings to send the mail by. |
|
What file should be attached to the mail. Choices:
|
|
A comma separated list of bcc recipient mail addresses. |
|
The email body. |
|
A comma separated list of cc recipient mail addresses. |
|
A comma separated list of recipient mail addresses. |
|
An email address to send the mail from. |
|
The email subject. |
|
The UID or the name a preconfigured SMTP server object. |
|
When the trigger is fired, sends an HTTPS POST web request to the configured URL.<br>The trigger data will be passed along with the SmartTask’s custom data in the request’s payload. |
|
The SHA1 fingerprint of the URL’s SSL certificate. Used to trust servers with self-signed SSL certificates. |
|
Option to send to the web request via a proxy other than the Management’s Server proxy (if defined). Choices:
|
|
URL of the proxy used to send the request. |
|
Shared secret that can be used by the target server to identify the Management Server.<br>The value will be sent as part of the request in the “X-chkp-shared-secret” header. |
|
Web Request time-out in seconds. |
|
URL used for the web request. |
|
Publish the current session if changes have been performed after task completes. Choices:
|
|
Color of the object. Should be one of existing colors. Choices:
|
|
Comments string. |
|
Per SmartTask custom data in JSON format.<br>When the trigger is fired, the trigger data is converted to JSON. The custom data is then concatenated to the trigger data JSON. |
|
Description of the SmartTask’s functionality and options. |
|
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:
|
|
Whether the SmartTask is enabled and will run when triggered. Choices:
|
|
If the action fails to execute, whether to treat the execution failure as an error, or continue. 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:
|
|
Object name. |
|
State of the access rule (present or absent). Choices:
|
|
Collection of tag identifiers. |
|
Trigger type associated with the SmartTask. |
|
Version of checkpoint. If not given one, the latest version taken. |
|
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-smart-task
cp_mgmt_smart_task:
action:
run_script:
repository_script: Session Name Validation Script
time_out: 30
custom_data: '{"session-name-format": "CR"}'
description: Run a validation script that ensures that the a session name matches the expected name format as described in the Custom Data field.
enabled: true
name: Validate Session Name Before Publish
state: present
trigger: Before Publish
- name: set-smart-task
cp_mgmt_smart_task:
action:
send_web_request:
fingerprint: 3FDD902286DBF130EF4CEC7939EF81060AB0FEB6
url: https://demo.example.com/policy-installation-reports
custom_data: '{"mail-address": "[email protected]"}'
description: Send policy installation results to the mail address specified in the Custom Data field using the corporate's dedicated web server.
enabled: true
name: Send Policy Installation Reports
state: present
trigger: After Install Policy
- name: delete-smart-task
cp_mgmt_smart_task:
name: Validate Session Name Before Publish
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. |