cp_mgmt_smart_task
Manages smart-task objects on Checkpoint over Web Services API through native controller HTTPAPI with owned sessions
Collection: check_point.mgmt
Full Name: check_point.mgmt.cp_mgmt_smart_task
Controller module — runs on the local controller, not on remote hosts.
Synopsis
Manages smart-task objects on Checkpoint over Web Services API through native controller HTTPAPI with owned sessions
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| action | dict | The action to be run when the trigger is fired. | ||
| auto_publish_session | bool | false | Publish this owned session explicitly after the operation; default false. | |
| color | str | Color of the object. Should be one of existing colors. | ||
| comments | str | Comments string. | ||
| custom_data | str | Per SmartTask custom data in JSON format. When the trigger is fired, the trigger data is converted to JSON. The custom data is then concatenated to the trigger data JSON. | ||
| description | str | Description of the SmartTask’s functionality and options. | ||
| details_level | str | 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. | ||
| enabled | bool | Whether the SmartTask is enabled and will run when triggered. | ||
| fail_open | bool | If the action fails to execute, whether to treat the execution failure as an error, or continue. | ||
| ignore_errors | bool | 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. | ||
| ignore_warnings | bool | Apply changes ignoring warnings. | ||
| name | str | yes | Object name. | |
| state | str | present | Desired object presence. | |
| tags | list | Collection of tag identifiers. | ||
| trigger | str | Trigger type associated with the SmartTask. | ||
| version | str | Management API version path; omitted uses the default API version. | ||
| wait_for_task | bool | true | Wait for returned asynchronous task identifiers; default true. | |
| wait_for_task_timeout | int | 30 | Polling deadline in minutes; default 30, negative values use 30, maximum 1440. |
Example
yaml
- name: add-smart-task
check_point.mgmt.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
check_point.mgmt.cp_mgmt_smart_task:
action:
send_web_request:
fingerprint: 3FDD902286DBF130EF4CEC7939EF81060AB0FEB6
url: https://demo.example.com/policy-installation-reports
custom_data: '{"mail-address": "example-admin@example-corp.com"}'
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
check_point.mgmt.cp_mgmt_smart_task:
name: Validate Session Name Before Publish
state: absent