<?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 Error Publishing Changes with Ansible in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114744#M491</link>
    <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;I'm having trouble tracking down my issue publishing the changes I've made in a playbook. Playbook is below as well as inventory. I've attempted to auto_publish_session when creating the host object, I've attempted removing the vars: from the publish task and various combinations but nothing has worked. My session appears in the MDS as&amp;nbsp;&lt;EM&gt;Disconnected&lt;/EM&gt; after the playbook has run and shows I have 2 changes and locks. I have to manually publish from MDS (right click, publish) for the changes to be applied.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run the host creation task and policy install task independently, they work fine. It's only when the publish comes into play. Running in verbose mode provides no additional useful information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;FAILED! =&amp;gt; {"changed": false, "msg": "Task Publish operation with task id 01234567-7843-cdef-a872-9b93c41e3005 failed. Look at the logs for more details"}&lt;/P&gt;&lt;P&gt;It should be noted, I'm running MDS and 80.40 (JHF 94).&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: cma&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- name: Create Host Object&lt;BR /&gt;cp_mgmt_host:&lt;BR /&gt;name: some-object-name&lt;BR /&gt;ipv4_address: 10.10.10.10&lt;BR /&gt;state: present&lt;BR /&gt;color: firebrick&lt;BR /&gt;comments: ChangeRequest#&lt;BR /&gt;ignore_warnings: yes&lt;BR /&gt;groups:&lt;BR /&gt;- Some-Group-Name&lt;/P&gt;&lt;P&gt;vars:&lt;BR /&gt;ansible_checkpoint_domain: MDS-Domain&lt;/P&gt;&lt;P&gt;- name: Publish Changes&lt;BR /&gt;cp_mgmt_publish:&lt;/P&gt;&lt;P&gt;vars:&lt;BR /&gt;ansible_checkpoint_domain: MDS-Domain&lt;/P&gt;&lt;P&gt;- name: Install Policy on MDS-Domain&lt;BR /&gt;cp_mgmt_install_policy:&lt;BR /&gt;policy_package: FW_Policy&lt;BR /&gt;install_on_all_cluster_members_or_fail: yes&lt;BR /&gt;targets:&lt;BR /&gt;- target1-fw&lt;BR /&gt;- target2-fw&lt;/P&gt;&lt;P&gt;vars:&lt;BR /&gt;ansible_checkpoint_domain: MDS-Domain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventory:&lt;/P&gt;&lt;P&gt;[cma]&lt;BR /&gt;10.10.10.10&lt;/P&gt;&lt;P&gt;[cma:vars]&lt;BR /&gt;ansible_httpapi_validate_certs=False&lt;BR /&gt;ansible_httpapi_use_ssl=True&lt;BR /&gt;ansible_network_os=check_point.mgmt.checkpoint&lt;BR /&gt;#ansible_network_os=checkpoint&lt;BR /&gt;ansible_user=myuser-name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Mar 2021 21:10:11 GMT</pubDate>
    <dc:creator>BJ_Brooks</dc:creator>
    <dc:date>2021-03-26T21:10:11Z</dc:date>
    <item>
      <title>Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114744#M491</link>
      <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;I'm having trouble tracking down my issue publishing the changes I've made in a playbook. Playbook is below as well as inventory. I've attempted to auto_publish_session when creating the host object, I've attempted removing the vars: from the publish task and various combinations but nothing has worked. My session appears in the MDS as&amp;nbsp;&lt;EM&gt;Disconnected&lt;/EM&gt; after the playbook has run and shows I have 2 changes and locks. I have to manually publish from MDS (right click, publish) for the changes to be applied.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run the host creation task and policy install task independently, they work fine. It's only when the publish comes into play. Running in verbose mode provides no additional useful information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;FAILED! =&amp;gt; {"changed": false, "msg": "Task Publish operation with task id 01234567-7843-cdef-a872-9b93c41e3005 failed. Look at the logs for more details"}&lt;/P&gt;&lt;P&gt;It should be noted, I'm running MDS and 80.40 (JHF 94).&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: cma&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- name: Create Host Object&lt;BR /&gt;cp_mgmt_host:&lt;BR /&gt;name: some-object-name&lt;BR /&gt;ipv4_address: 10.10.10.10&lt;BR /&gt;state: present&lt;BR /&gt;color: firebrick&lt;BR /&gt;comments: ChangeRequest#&lt;BR /&gt;ignore_warnings: yes&lt;BR /&gt;groups:&lt;BR /&gt;- Some-Group-Name&lt;/P&gt;&lt;P&gt;vars:&lt;BR /&gt;ansible_checkpoint_domain: MDS-Domain&lt;/P&gt;&lt;P&gt;- name: Publish Changes&lt;BR /&gt;cp_mgmt_publish:&lt;/P&gt;&lt;P&gt;vars:&lt;BR /&gt;ansible_checkpoint_domain: MDS-Domain&lt;/P&gt;&lt;P&gt;- name: Install Policy on MDS-Domain&lt;BR /&gt;cp_mgmt_install_policy:&lt;BR /&gt;policy_package: FW_Policy&lt;BR /&gt;install_on_all_cluster_members_or_fail: yes&lt;BR /&gt;targets:&lt;BR /&gt;- target1-fw&lt;BR /&gt;- target2-fw&lt;/P&gt;&lt;P&gt;vars:&lt;BR /&gt;ansible_checkpoint_domain: MDS-Domain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventory:&lt;/P&gt;&lt;P&gt;[cma]&lt;BR /&gt;10.10.10.10&lt;/P&gt;&lt;P&gt;[cma:vars]&lt;BR /&gt;ansible_httpapi_validate_certs=False&lt;BR /&gt;ansible_httpapi_use_ssl=True&lt;BR /&gt;ansible_network_os=check_point.mgmt.checkpoint&lt;BR /&gt;#ansible_network_os=checkpoint&lt;BR /&gt;ansible_user=myuser-name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 21:10:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114744#M491</guid>
      <dc:creator>BJ_Brooks</dc:creator>
      <dc:date>2021-03-26T21:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114751#M492</link>
      <description>&lt;P&gt;What does $FWDIR/log/api.elg say when you try to publish?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 21:49:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114751#M492</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-03-26T21:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114757#M493</link>
      <description>&lt;P&gt;There is no api.elg to be found... in all of /opt.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 22:27:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114757#M493</guid>
      <dc:creator>BJ_Brooks</dc:creator>
      <dc:date>2021-03-26T22:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114758#M494</link>
      <description>&lt;P&gt;I'll add that the audit log from the CMA only shows a login/logout.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 22:30:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114758#M494</guid>
      <dc:creator>BJ_Brooks</dc:creator>
      <dc:date>2021-03-26T22:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114759#M495</link>
      <description>&lt;P&gt;Please use the ENV variable $FWDIR to get to that directory. At the end of the day, it will be in /var/log/opt/CPsuite-R80.40/fw1/log/api.elg&lt;BR /&gt;If you use the $FWDIR/log/api.elg it will point to the same location.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 22:37:21 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114759#M495</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2021-03-26T22:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114770#M496</link>
      <description>&lt;P&gt;He also can modify api log level using "api log debug" and after replication of issue "api log warn" or whatever.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 06:55:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114770#M496</guid>
      <dc:creator>Vincent_Bacher</dc:creator>
      <dc:date>2021-03-27T06:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114888#M497</link>
      <description>&lt;P&gt;Thanks... was able to locate. Issue is session description.&amp;nbsp;&lt;/P&gt;&lt;P&gt;"fault-message" : "Publish cannot be performed without entering a session name and description."&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 17:53:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/114888#M497</guid>
      <dc:creator>BJ_Brooks</dc:creator>
      <dc:date>2021-03-29T17:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/115062#M500</link>
      <description>&lt;P&gt;Still haven't cracked this one... api.elg is displaying the below.&lt;/P&gt;&lt;P&gt;"fault-message" : "Publish cannot be performed without entering a session name and description."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have include a task to set the session... have attempted auto publish on the object creation task to no avail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- name: set-session&lt;BR /&gt;cp_mgmt_set_session:&lt;BR /&gt;description: "CR123456789"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts? The MDS is set to have a session name generated on publish. If we do it through the CMA, we can set the session name to whatever we want, but through ansible, not so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 19:33:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/115062#M500</guid>
      <dc:creator>BJ_Brooks</dc:creator>
      <dc:date>2021-03-31T19:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/115071#M502</link>
      <description>&lt;P&gt;There's a setting on the management side to not require a description.&lt;BR /&gt;It's possible this may be required to use the auto-publish feature.&lt;BR /&gt;Paging&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/41271"&gt;@Or_Soffer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-03-31 at 5.42.47 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/11228iE41DEA83A88CAE01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2021-03-31 at 5.42.47 PM.png" alt="Screen Shot 2021-03-31 at 5.42.47 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 00:43:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/115071#M502</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-01T00:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error Publishing Changes with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/115683#M508</link>
      <description>&lt;P&gt;If your management requires &lt;STRONG&gt;All sessions must have a description&lt;/STRONG&gt;&amp;nbsp;you need to explicitly set both &lt;STRONG&gt;description&lt;/STRONG&gt;&amp;nbsp;and &lt;STRONG&gt;new_name&lt;/STRONG&gt;&amp;nbsp;for the session through Ansible.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210409_085031-WindowsTerminal-314.png" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/11322i78374444CE6C04C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="20210409_085031-WindowsTerminal-314.png" alt="20210409_085031-WindowsTerminal-314.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want to use &lt;STRONG&gt;auto_publish&amp;nbsp;&lt;/STRONG&gt;just make sure that `set_session` is performed prior to the task with &lt;STRONG&gt;auto_publish.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The requirement for both name and description is not limited to Ansible, but affects all API usage (including `mgmt_cli`) when &lt;STRONG&gt;All sessions must have a description &lt;/STRONG&gt;is enabled.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 12:59:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Error-Publishing-Changes-with-Ansible/m-p/115683#M508</guid>
      <dc:creator>Jonas_Rosenboom</dc:creator>
      <dc:date>2021-04-09T12:59:06Z</dc:date>
    </item>
  </channel>
</rss>

