<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Handling locked by another session issue in Ansible playbooks in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263543#M876</link>
    <description>&lt;P&gt;Thank you for your response. I will try your solution.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Nov 2025 12:01:47 GMT</pubDate>
    <dc:creator>Govind135438</dc:creator>
    <dc:date>2025-11-24T12:01:47Z</dc:date>
    <item>
      <title>Handling locked by another session issue in Ansible playbooks</title>
      <link>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263533#M874</link>
      <description>&lt;P&gt;I am facing the error like below from Ansible playbook from modules from "&lt;FONT size="2"&gt;check_point.mgmt&lt;/FONT&gt;" collection.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TASK [Add VLAN interface to Management gateway object] **************************************************************************************************************
fatal: [10.25.58.51]: FAILED! =&amp;gt; {"changed": false, "msg": "Checkpoint device returned error 400 with message {'code': 'generic_error', 'message': \"Action cannot be executed on object: gw-893628 due to: Object 'gw-893628' is locked by another session.\"} Unpublished changes were discarded"}&lt;/LI-CODE&gt;&lt;P&gt;This error occurs when I have some unpublished changes from Check Point Smartconsole or command-line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I force changes from Ansible when there are unpublished changes from others? Or what is the best practice to follow in this scenario?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 08:39:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263533#M874</guid>
      <dc:creator>Govind135438</dc:creator>
      <dc:date>2025-11-24T08:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Handling locked by another session issue in Ansible playbooks</title>
      <link>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263541#M875</link>
      <description>&lt;P&gt;A quick answer from my mind &lt;U&gt;&lt;STRONG&gt;without&lt;/STRONG&gt; &lt;/U&gt;any validation from documentation:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Run show-sessions API call to get all sessions&lt;/LI&gt;
&lt;LI&gt;Then looping through the sessions and find sessions with locks using show-session API call
&lt;UL&gt;
&lt;LI&gt;take-over the session&lt;/LI&gt;
&lt;LI&gt;discard or publish to get rid of the locks&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;continue with your changes&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;...but I think the Ansible collection does not support all of it, so you have to build your own API calls using Web-Services API.&lt;/P&gt;
&lt;P&gt;Maybe CheckMates folks find a better way.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 10:21:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263541#M875</guid>
      <dc:creator>Daniel_Kuhl1</dc:creator>
      <dc:date>2025-11-24T10:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Handling locked by another session issue in Ansible playbooks</title>
      <link>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263543#M876</link>
      <description>&lt;P&gt;Thank you for your response. I will try your solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 12:01:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263543#M876</guid>
      <dc:creator>Govind135438</dc:creator>
      <dc:date>2025-11-24T12:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Handling locked by another session issue in Ansible playbooks</title>
      <link>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263557#M877</link>
      <description>&lt;P&gt;You can't publish another session, reliably, even if your administrator account has access to do so. &amp;nbsp;You don't want to do this. &amp;nbsp;Instead, you need to open SmartConsole -&amp;gt; Manage &amp;amp; Settings -&amp;gt; Sessions and see who has open sessions and object locks. &amp;nbsp;You either need to discard those sessions (if you have permissions to do so), or ask the other administrators to close their sessions. &amp;nbsp;The management server is trying to protect you from unwanted, and unexpected, results that you may not want. &amp;nbsp;Don't violate this or you will have trouble.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 14:46:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Handling-locked-by-another-session-issue-in-Ansible-playbooks/m-p/263557#M877</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2025-11-24T14:46:26Z</dc:date>
    </item>
  </channel>
</rss>

