PARALLAX

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

NameTypeRequiredDefaultDescription
actiondictThe action to be run when the trigger is fired.
auto_publish_sessionboolfalsePublish this owned session explicitly after the operation; default false.
colorstrColor of the object. Should be one of existing colors.
commentsstrComments string.
custom_datastrPer 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.
descriptionstrDescription of the SmartTask’s functionality and options.
details_levelstrThe 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.
enabledboolWhether the SmartTask is enabled and will run when triggered.
fail_openboolIf the action fails to execute, whether to treat the execution failure as an error, or continue.
ignore_errorsboolApply 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_warningsboolApply changes ignoring warnings.
namestryesObject name.
statestrpresentDesired object presence.
tagslistCollection of tag identifiers.
triggerstrTrigger type associated with the SmartTask.
versionstrManagement API version path; omitted uses the default API version.
wait_for_taskbooltrueWait for returned asynchronous task identifiers; default true.
wait_for_task_timeoutint30Polling 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
Search
    ↑ ↓ move↵ openesc close