CheckPointAnsibleMgmtCollection icon indicating copy to clipboard operation
CheckPointAnsibleMgmtCollection copied to clipboard

Maintaining the same session across multiple playbooks

Open shermannws opened this issue 2 years ago • 7 comments

May I ask if there is a way to maintain the same session across multiple playbooks? Thank you!

shermannws avatar Jun 20 '22 01:06 shermannws

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!

shermannws avatar Jun 20 '22 02:06 shermannws

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

shermannws avatar Jun 20 '22 06:06 shermannws

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

chkp-edenbr avatar Jun 20 '22 09:06 chkp-edenbr

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".

image

shermannws avatar Jun 21 '22 01:06 shermannws

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!

shermannws avatar Jun 23 '22 02:06 shermannws

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

chkp-edenbr avatar Jun 26 '22 06:06 chkp-edenbr

Thank you @chkp-edenbr ! Cheers!

shermannws avatar Jun 26 '22 14:06 shermannws