CheckPointAnsibleMgmtCollection
CheckPointAnsibleMgmtCollection copied to clipboard
Maintaining the same session across multiple playbooks
May I ask if there is a way to maintain the same session across multiple playbooks? Thank you!
Essentially, I hope to have another playbook to publish all the changes made by the previous playbooks. I have the UID for each of the sessions that was created by the previous playbook. However, when I run
- name: Publish session
cp_mgmt_publish:
uid: "{{ uid }}"
The output that I get is:
{
"msg": "Checkpoint device returned error 501 with message {'code': 'not_implemented', 'message': 'Publishing other than current session is not implemented'} Unpublished changes were discarded",
"invocation": {
"module_args": {
"uid": "<<UID>>",
"wait_for_task": true,
"wait_for_task_timeout": 30,
"version": null
}
}
}
May check how I can go about resolving this issue? Many thanks in advance!
Seems to be a existing problem from here. Can check if there has been any update to this? Or am I supposed to pre-configure some settings on Smart Console and/or Gaia
Hi,
Thanks for notifying us. The option to switch session (https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/switch-session~v1.9%20) will be available in future versions.
Regards, Eden
Thank you @chkp-edenbr !
Can I confirm that the documentation for cp_mgmt_publish
is currently incomplete? In the documentation, it seems that it has wrongly states that uid
can be specified as parameter to "publish a different session than the one you currently use".

Hello! Can I check if there is an expected timeline for the cp_mgmt
module for switching session to be implemented? Thank you very much!
Hi,
Concerning cp_mgmt_publish, thank you for notifying us, we will update the module and release it in a future version.
Concerning switching sessions module, we currently don't have an expected timeline.
Thank you,
Eden
Thank you @chkp-edenbr ! Cheers!