<?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 Server returned response without token info during connection authentication in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95514#M372</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My first post in checkmates forum so be gentle &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Trying to connect to Gaia rest api with ansible&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Inventory :&lt;/P&gt;&lt;P&gt;[test:vars]&lt;BR /&gt;checkpoint ansible_host=XXXXXXX&lt;BR /&gt;ansible_user='XXXXXXXXX'&lt;BR /&gt;ansible_password='XXXXXXXXXXX'&lt;BR /&gt;ansible_network_os=checkpoint&lt;BR /&gt;ansible_httpapi_use_ssl=True&lt;BR /&gt;ansible_httpapi_validate_certs=False&lt;/P&gt;&lt;P&gt;[test]&lt;BR /&gt;XXXXXXX&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Playbook:&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: test&lt;BR /&gt;connection: httpapi&lt;BR /&gt;gather_facts: false&lt;BR /&gt;tasks:&lt;BR /&gt;- name: collect-host facts&lt;BR /&gt;cp_mgmt_host_facts:&lt;BR /&gt;details_level: standard&lt;BR /&gt;limit: 50&lt;BR /&gt;offset: 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I get this response :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PLAY [test] *******************************************************************************************************************************************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;TASK [collect-host facts] *****************************************************************************************************************************************************************************************************************************************************&lt;BR /&gt;An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: Server returned response without token info during connection authentication: 200&lt;BR /&gt;fatal: [XXXXXXX]: FAILED! =&amp;gt; {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/user/thki/.ansible/tmp/ansible-local-1618CZXifK/ansible-tmp-1598617196.57-1627-159382009972429/AnsiballZ_cp_mgmt_host_facts.py\", line 102, in &amp;lt;module&amp;gt;\n _ansiballz_main()\n File \"/user/thki/.ansible/tmp/ansible-local-1618CZXifK/ansible-tmp-1598617196.57-1627-159382009972429/AnsiballZ_cp_mgmt_host_facts.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/user/thki/.ansible/tmp/ansible-local-1618CZXifK/ansible-tmp-1598617196.57-1627-159382009972429/AnsiballZ_cp_mgmt_host_facts.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.check_point.cp_mgmt_host_facts', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/modules/network/check_point/cp_mgmt_host_facts.py\", line 131, in &amp;lt;module&amp;gt;\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/modules/network/check_point/cp_mgmt_host_facts.py\", line 126, in main\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/module_utils/network/checkpoint/checkpoint.py\", line 179, in api_call_facts\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/module_utils/network/checkpoint/checkpoint.py\", line 56, in send_request\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: Server returned response without token info during connection authentication: 200\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}&lt;/P&gt;&lt;P&gt;PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************&lt;BR /&gt;XXXXXXX : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# ansible --version&lt;BR /&gt;ansible 2.9.12&lt;BR /&gt;config file = /etc/ansible/ansible.cfg&lt;BR /&gt;configured module search path = [u'/user/thki/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']&lt;BR /&gt;ansible python module location = /usr/lib/python2.7/site-packages/ansible&lt;BR /&gt;executable location = /usr/bin/ansible&lt;BR /&gt;python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive verified that I can connect to api via curl and get token back? Our checkpoint administrator can see login and logoff on management server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;</description>
    <pubDate>Fri, 28 Aug 2020 14:09:44 GMT</pubDate>
    <dc:creator>thki</dc:creator>
    <dc:date>2020-08-28T14:09:44Z</dc:date>
    <item>
      <title>Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95514#M372</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My first post in checkmates forum so be gentle &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Trying to connect to Gaia rest api with ansible&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Inventory :&lt;/P&gt;&lt;P&gt;[test:vars]&lt;BR /&gt;checkpoint ansible_host=XXXXXXX&lt;BR /&gt;ansible_user='XXXXXXXXX'&lt;BR /&gt;ansible_password='XXXXXXXXXXX'&lt;BR /&gt;ansible_network_os=checkpoint&lt;BR /&gt;ansible_httpapi_use_ssl=True&lt;BR /&gt;ansible_httpapi_validate_certs=False&lt;/P&gt;&lt;P&gt;[test]&lt;BR /&gt;XXXXXXX&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Playbook:&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: test&lt;BR /&gt;connection: httpapi&lt;BR /&gt;gather_facts: false&lt;BR /&gt;tasks:&lt;BR /&gt;- name: collect-host facts&lt;BR /&gt;cp_mgmt_host_facts:&lt;BR /&gt;details_level: standard&lt;BR /&gt;limit: 50&lt;BR /&gt;offset: 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I get this response :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PLAY [test] *******************************************************************************************************************************************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;TASK [collect-host facts] *****************************************************************************************************************************************************************************************************************************************************&lt;BR /&gt;An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: Server returned response without token info during connection authentication: 200&lt;BR /&gt;fatal: [XXXXXXX]: FAILED! =&amp;gt; {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/user/thki/.ansible/tmp/ansible-local-1618CZXifK/ansible-tmp-1598617196.57-1627-159382009972429/AnsiballZ_cp_mgmt_host_facts.py\", line 102, in &amp;lt;module&amp;gt;\n _ansiballz_main()\n File \"/user/thki/.ansible/tmp/ansible-local-1618CZXifK/ansible-tmp-1598617196.57-1627-159382009972429/AnsiballZ_cp_mgmt_host_facts.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/user/thki/.ansible/tmp/ansible-local-1618CZXifK/ansible-tmp-1598617196.57-1627-159382009972429/AnsiballZ_cp_mgmt_host_facts.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.check_point.cp_mgmt_host_facts', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/modules/network/check_point/cp_mgmt_host_facts.py\", line 131, in &amp;lt;module&amp;gt;\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/modules/network/check_point/cp_mgmt_host_facts.py\", line 126, in main\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/module_utils/network/checkpoint/checkpoint.py\", line 179, in api_call_facts\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/module_utils/network/checkpoint/checkpoint.py\", line 56, in send_request\n File \"/tmp/ansible_cp_mgmt_host_facts_payload_fQtftI/ansible_cp_mgmt_host_facts_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: Server returned response without token info during connection authentication: 200\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}&lt;/P&gt;&lt;P&gt;PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************&lt;BR /&gt;XXXXXXX : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# ansible --version&lt;BR /&gt;ansible 2.9.12&lt;BR /&gt;config file = /etc/ansible/ansible.cfg&lt;BR /&gt;configured module search path = [u'/user/thki/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']&lt;BR /&gt;ansible python module location = /usr/lib/python2.7/site-packages/ansible&lt;BR /&gt;executable location = /usr/bin/ansible&lt;BR /&gt;python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive verified that I can connect to api via curl and get token back? Our checkpoint administrator can see login and logoff on management server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 14:09:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95514#M372</guid>
      <dc:creator>thki</dc:creator>
      <dc:date>2020-08-28T14:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95562#M373</link>
      <description>&lt;P&gt;What precise version of Check Point Management (with JHF level) are you connecting with?&lt;BR /&gt;Believe for Ansible, it should be R80.20+ with a recent JHF installed.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 06:42:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95562#M373</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-08-29T06:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95636#M374</link>
      <description>&lt;P&gt;we are running R80.30+ jumbo 155&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 06:43:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/95636#M374</guid>
      <dc:creator>thki</dc:creator>
      <dc:date>2020-08-31T06:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101371#M394</link>
      <description>&lt;P&gt;Did someone find a fix for this ? I am facing the same issue on R80.40:&lt;/P&gt;&lt;P&gt;This is Check Point Security Management Server R80.40 - Build 150&lt;BR /&gt;This is Check Point's software version R80.40 - Build 685&lt;/P&gt;&lt;P&gt;Can someone please help ?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 15:09:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101371#M394</guid>
      <dc:creator>mervin16</dc:creator>
      <dc:date>2020-11-07T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101374#M396</link>
      <description>&lt;P&gt;Did you enable the API and allow access for the ip/subnet you are connecting from?&lt;/P&gt;
&lt;P&gt;What does the output from a simple curl test say?&lt;/P&gt;
&lt;P&gt;curl https://&amp;lt;mgmtip&amp;gt;/web_api/login -H 'Content-Type: application/json' -d '{"user":"xxx", "password":"xxx" }' -kv&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 15:37:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101374#M396</guid>
      <dc:creator>Sigbjorn</dc:creator>
      <dc:date>2020-11-07T15:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101385#M399</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Not sure if you are trying to use the gaia collection that leverages the gaia API or the mgmt collection that leverages the Management API. &lt;BR /&gt;The playbook in in the start of this thread is using a module from the mgmt collection that leverages the Management API.&lt;/P&gt;
&lt;P&gt;Anyway&lt;BR /&gt;I recommend to take a look at the Read Me under: &lt;A href="https://galaxy.ansible.com/check_point/mgmt" target="_self"&gt;https://galaxy.ansible.com/check_point/mgmt&lt;/A&gt;&lt;BR /&gt;I recommend to download the latest collection from galaxy.&lt;BR /&gt;Here is a updated working example using the mgmt collection from galaxy:&lt;/P&gt;
&lt;P&gt;/etc/ansible/hosts&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[test:vars]
ansible_user=api_user # Admin username on management server
ansible_password=vpn123 # Admin password on management server
ansible_network_os=check_point.mgmt.checkpoint
ansible_httpapi_use_ssl=True
ansible_httpapi_validate_certs=False

[test]
192.168.233.71 # IP of the Check Point management server
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The playbook using the collection from galaxy&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;---
- hosts: test
  connection: httpapi
  gather_facts: false
  tasks:
    - name: collect-host facts
      check_point.mgmt.cp_mgmt_host_facts:
        details_level: standard
        limit: 50
        offset: 0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind Regards&lt;BR /&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 20:42:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101385#M399</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2020-11-07T20:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Server returned response without token info during connection authentication</title>
      <link>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101391#M401</link>
      <description>&lt;P&gt;In addition, take a look at my response here to ensure you are not encountering the problem I am mentioning in that response&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/Ansible/Ansible-Connection-Error/m-p/101387/highlight/true#M400" target="_self"&gt;https://community.checkpoint.com/t5/Ansible/Ansible-Connection-Error/m-p/101387/highlight/true#M400&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 21:52:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Server-returned-response-without-token-info-during-connection/m-p/101391#M401</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2020-11-07T21:52:10Z</dc:date>
    </item>
  </channel>
</rss>

