<?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: Query IP address in multi-domain environment in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-IP-address-in-multi-domain-environment/m-p/151177#M6895</link>
    <description>&lt;P&gt;I found out why. Here is my hosts and playbook for ansible:&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;# This is the default ansible 'hosts' file.&lt;/P&gt;&lt;P&gt;[checkpoint]&lt;BR /&gt;&amp;lt;x.x.x.x&amp;gt;&lt;/P&gt;&lt;P&gt;[checkpoint:vars]&lt;/P&gt;&lt;P&gt;ansible_python_interpreter=/usr/bin/python3.6&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_user=&amp;lt;username&amp;gt;&lt;BR /&gt;ansible_password=&amp;lt;password&amp;gt;&lt;BR /&gt;ansible_checkpoint_domain=&amp;lt;domain name&amp;gt;&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;# This is the ansible 'playbook' file.&lt;BR /&gt;---&lt;BR /&gt;- hosts: checkpoint&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;- name: show-host&lt;BR /&gt;cp_mgmt_host_facts:&lt;BR /&gt;name: Host_82.5.223.125&lt;BR /&gt;register: result&lt;/P&gt;&lt;P&gt;- name: show-hosts&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;- name: Printing The Result&lt;BR /&gt;debug:&lt;BR /&gt;msg: "{{result}}"&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2022 21:37:48 GMT</pubDate>
    <dc:creator>paredesh</dc:creator>
    <dc:date>2022-06-22T21:37:48Z</dc:date>
    <item>
      <title>Query IP address in multi-domain environment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-IP-address-in-multi-domain-environment/m-p/151111#M6882</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We have a multi-domain environment R81.10. I am trying to search for objects using ansible that have x.x.x.x IP address in all domains. I read somewhere that even though I log into a specific domain I have to specify the domain in the playbook. I do not see that in the documentation. Could it be you can't do it using ansible and only able to do it via a script (like python)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My playbook:&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: checkpoint # Tells Ansible which plugin to use.&lt;BR /&gt;connection: httpapi # Determines connection.&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;- name: Get object facts&lt;BR /&gt;checkpoint_object_facts:&lt;BR /&gt;object_filter: 192.168.30.30&lt;BR /&gt;ip_only: yes&lt;/P&gt;&lt;P&gt;- name: Printing The Result&lt;BR /&gt;debug:&lt;BR /&gt;msg: "{{result}}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="Ansible" id="ansible"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;#python&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 23:59:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-IP-address-in-multi-domain-environment/m-p/151111#M6882</guid>
      <dc:creator>paredesh</dc:creator>
      <dc:date>2022-06-16T23:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Query IP address in multi-domain environment</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-IP-address-in-multi-domain-environment/m-p/151177#M6895</link>
      <description>&lt;P&gt;I found out why. Here is my hosts and playbook for ansible:&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;# This is the default ansible 'hosts' file.&lt;/P&gt;&lt;P&gt;[checkpoint]&lt;BR /&gt;&amp;lt;x.x.x.x&amp;gt;&lt;/P&gt;&lt;P&gt;[checkpoint:vars]&lt;/P&gt;&lt;P&gt;ansible_python_interpreter=/usr/bin/python3.6&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_user=&amp;lt;username&amp;gt;&lt;BR /&gt;ansible_password=&amp;lt;password&amp;gt;&lt;BR /&gt;ansible_checkpoint_domain=&amp;lt;domain name&amp;gt;&lt;/P&gt;&lt;P&gt;++++++++++++++++++++++++++++++++++++++++&lt;/P&gt;&lt;P&gt;# This is the ansible 'playbook' file.&lt;BR /&gt;---&lt;BR /&gt;- hosts: checkpoint&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;/P&gt;&lt;P&gt;- name: show-host&lt;BR /&gt;cp_mgmt_host_facts:&lt;BR /&gt;name: Host_82.5.223.125&lt;BR /&gt;register: result&lt;/P&gt;&lt;P&gt;- name: show-hosts&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;- name: Printing The Result&lt;BR /&gt;debug:&lt;BR /&gt;msg: "{{result}}"&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 21:37:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-IP-address-in-multi-domain-environment/m-p/151177#M6895</guid>
      <dc:creator>paredesh</dc:creator>
      <dc:date>2022-06-22T21:37:48Z</dc:date>
    </item>
  </channel>
</rss>

