<?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: Ansible Playbook Error in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/96348#M376</link>
    <description>&lt;P&gt;I had the same issue.&lt;/P&gt;&lt;P&gt;I was able to workaround the issue by adding '&lt;SPAN&gt;wait_for_task&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"no"'&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to the task parameters.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2020 10:38:44 GMT</pubDate>
    <dc:creator>Jacco_Gillis</dc:creator>
    <dc:date>2020-09-09T10:38:44Z</dc:date>
    <item>
      <title>Ansible Playbook Error</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/92301#M338</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a playbook that is using the cp_mgmt_run_script module. The following error is returned when the playbook is run.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TASK [run-script] ****************************************************************************************************************&lt;BR /&gt;fatal: [10.1.2.51]: FAILED! =&amp;gt; {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": {" code": "generic_err_invalid_parameter", "message": "ERROR: Failed to handle asynchronous tasks as synchronous, tasks result is und efined.\nInvalid parameter for [task-id]. Invalid value"}}&lt;/P&gt;&lt;P&gt;The task actually runs successfully against the target gateway, the task appears in the SmartConsole task list and returns the expected result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excerpt from $FWDIR/log/api.elg&lt;/P&gt;&lt;P&gt;---------------------------&lt;BR /&gt;ID: 14684&lt;BR /&gt;Response-Code: 400&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {Content-Type=[application/json], Date=[Thu, 23 Jul 2020 23:57:15 GMT]}&lt;BR /&gt;Payload: {&lt;BR /&gt;"code" : "generic_err_invalid_parameter",&lt;BR /&gt;"message" : "Invalid parameter for [task-id]. Invalid value"&lt;BR /&gt;}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2020-07-23 23:57:17,419 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp1325351680-37] - Inbound Message&lt;BR /&gt;----------------------------&lt;BR /&gt;ID: 14685&lt;BR /&gt;Address: &lt;A href="http://127.0.0.1:50276/web_api/show-task" target="_blank"&gt;http://127.0.0.1:50276/web_api/show-task&lt;/A&gt;&lt;BR /&gt;Encoding: ISO-8859-1&lt;BR /&gt;Http-Method: POST&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Headers: {accept-encoding=[identity], connection=[keep-alive], Content-Length=[114], content-type=[application/json], Host=[127.0.0.1:50276], User-Agent=[Python-urllib/2.7], X-Chkp-Sid=[8b04d47571c316b5c41d763d30263ffe], X-Forwarded-For=[10.1.7.110], X-Forwarded-Host=[10.1.2.51:443], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[10.1.2.51]}&lt;BR /&gt;Payload: {"task-id": {"task-id": "01466935-7a42-4478-89bd-d38019364e0b", "target": "26db824a-f9a9-436b-a826-9899f41c8c4e"}}&lt;BR /&gt;--------------------------------------&lt;BR /&gt;2020-07-23 23:57:17,425 WARN com.checkpoint.management.web_api_is.utils.helpers.RequestHeadersHelper.getMediaType_aroundBody6:9 [qtp1325351680-37] - No Accept header received. Falling back to default media type [application/json].&lt;BR /&gt;2020-07-23 23:57:17,426 INFO com.checkpoint.management.web_api_is.utils.helpers.ApiCache.&amp;lt;init&amp;gt;:21 [qtp1325351680-37] - Cache created and initialized&lt;BR /&gt;2020-07-23 23:57:17,427 ERROR com.checkpoint.management.web_api_is.utils.jackson.deserializers.BaseMultiValueDeserializer.deserializeSingleObject_aroundBody2:16 [qtp1325351680-37] - Failed to deserialize parameter: [task-id], value is not from type: [java.lang.String]&lt;BR /&gt;2020-07-23 23:57:17,427 ERROR com.checkpoint.management.web_api_is.exceptions.WebApiGeneralException.log:42 [qtp1325351680-37] - Error code: [GENERIC_ERR_INVALID_PARAMETER]&lt;BR /&gt;2020-07-23 23:57:17,428 ERROR com.checkpoint.management.web_api_is.exceptions.WebApiGeneralException.log:43 [qtp1325351680-37] - Error message: [Invalid parameter for [task-id]. Invalid value]&lt;/P&gt;&lt;P&gt;Here is my playbook&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: checkpoint&lt;BR /&gt;connection: httpapi&lt;BR /&gt;gather_facts: False&lt;BR /&gt;tasks:&lt;BR /&gt;- name: run-script&lt;BR /&gt;cp_mgmt_run_script:&lt;BR /&gt;script_name: "List root"&lt;BR /&gt;script: ls -l /&lt;BR /&gt;targets:&lt;BR /&gt;- "26db824a-f9a9-436b-a826-9899f41c8c4e"&lt;BR /&gt;register: show_list_root_response&lt;BR /&gt;- name: display list root results&lt;BR /&gt;debug:&lt;BR /&gt;msg: "{{ show_list_root_response }}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 01:18:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/92301#M338</guid>
      <dc:creator>Simon_Macpherso</dc:creator>
      <dc:date>2020-07-24T01:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Playbook Error</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/96348#M376</link>
      <description>&lt;P&gt;I had the same issue.&lt;/P&gt;&lt;P&gt;I was able to workaround the issue by adding '&lt;SPAN&gt;wait_for_task&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"no"'&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to the task parameters.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 10:38:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/96348#M376</guid>
      <dc:creator>Jacco_Gillis</dc:creator>
      <dc:date>2020-09-09T10:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Playbook Error</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/98050#M385</link>
      <description>&lt;P&gt;Hi Simon,&lt;/P&gt;
&lt;P&gt;There is an issue with the&amp;nbsp;cp_mgmt_run_script included by default in ansible 2.9+.&lt;BR /&gt;This is fixed in the collection in galaxy and I believe also in the collection included in ansible 2.10&lt;/P&gt;
&lt;P&gt;Remember to always use the latest updated collection available here:&lt;BR /&gt;&lt;A href="https://galaxy.ansible.com/check_point/mgmt" target="_self" rel="nofollow noopener noreferrer"&gt;https://galaxy.ansible.com/check_point/mgmt&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can find information about the updates in the different releases of the collection here:&lt;BR /&gt;&lt;A href="https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection/releases" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection/releases&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Kind Regards&lt;BR /&gt;Jim&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 07:45:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Playbook-Error/m-p/98050#M385</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2020-10-02T07:45:15Z</dc:date>
    </item>
  </channel>
</rss>

