My only guess regarding the SIC error is that the target definition isn't reachable or hasn't been fully configured yet.
The run-script will not copy a script from the local directory and deploy it to a remote deployment for use. You need to insert the body of the script into the "script" command before running it from the management API.
From https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection/blob/master/plugins/modules/checkpoi...
script:
description:
- Script body contents.
type: str
required: true
This mirrors the run-script API documentation.
- https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/run-script~v1.7%20
I haven't run this in my lab, so this might not provide the results. However, I would expect it to look similar to below.
---
- hosts: check_point
connection: httpapi
gather_facts: False
vars_files:
- 'credentials/ansible_login_information.yml'
tasks:
- name: run-script
check_point.mgmt.cp_mgmt_run_script:
script: "cpstat os -f all"
script_name: 'Check stat'
targets:
- deployed-gw-1
wait_for_task_timeout: 30
EDIT: One other thing I didn't mention is that you'll need to query the task-id from the run-script command to see the results for this particular playbook.