<?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 Checkpoint Module - check_point.mgmt.cp_mgmt_host in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116061#M514</link>
    <description>&lt;P&gt;Is there a way, may be another module which can check if the same host exist then it can just error out? What if I want to create different groups with the same hosts but the same hosts can exist in multiple groups? Because there are different team members who works on different tasks and may not be able to check if the host is already present on the Firewall.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 20:19:37 GMT</pubDate>
    <dc:creator>tawsif</dc:creator>
    <dc:date>2021-04-14T20:19:37Z</dc:date>
    <item>
      <title>Ansible Checkpoint Module - check_point.mgmt.cp_mgmt_host</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116018#M510</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running into an issue when I try to use the above mentioned module. In my Firewall environment, we have 5 domains and hence we use Global domain for a Global assignment on all 5 domains. However when I use this module, if the hosts are not present in any domain, it tends to create the host and adds it to the assigned group that is mentioned on the script. But if the hosts are already present on the firewalls and already exist on different groups, it tends to move the existing hosts from the other groups and puts it in the new group that is mentioned on the script. This is creating an outage on our firewall rules. Is there a workaround for this? Below is the sample script that I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;-&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;add-host-object&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;check_point.mgmt.cp_mgmt_host&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"{{&amp;nbsp;item.value.Name&amp;nbsp;|&amp;nbsp;quote&amp;nbsp;}}"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ip_address&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"{{&amp;nbsp;item.value.IP&amp;nbsp;|&amp;nbsp;quote&amp;nbsp;}}"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt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&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;present&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;auto_publish_session&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;yes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ignore_errors&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;yes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;delegate_to&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Global&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;wait&amp;nbsp;for&amp;nbsp;session&amp;nbsp;to&amp;nbsp;be&am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p;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- xxx&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;global_domains&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Global&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;wait_for_task&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;yes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;wait_for_task_timeout&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;30&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ignore_errors&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;yes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:58:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116018#M510</guid>
      <dc:creator>tawsif</dc:creator>
      <dc:date>2021-04-14T14:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Checkpoint Module - check_point.mgmt.cp_mgmt_host</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116038#M511</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;this happens because when you specify&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;groups: gTest1A
&lt;/LI-CODE&gt;
&lt;P&gt;you tell it to make sure the host is in the listed groups (gTest1A) and &lt;STRONG&gt;ONLY&lt;/STRONG&gt; in those groups.&lt;/P&gt;
&lt;P&gt;Depending on your setup, the correct solution could be to configure the group members with the cp_mgmt_group module.&lt;/P&gt;
&lt;P&gt;This will work if the group is not supposed to contain any members that are configured outside of your Ansible script. Otherwise it would have the same effect, where it will remove all hosts and only leave the ones specified as members.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 16:37:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116038#M511</guid>
      <dc:creator>Jonas_Rosenboom</dc:creator>
      <dc:date>2021-04-14T16:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Checkpoint Module - check_point.mgmt.cp_mgmt_host</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116049#M512</link>
      <description>&lt;P&gt;Hi Jonas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in my environment, IP's get re-used all the time and there may be cases where the hostnames have changed but IP's remained the same and the firewall has the existing host object with the same IP in a different group. When we get a new request to create a new group with new hostnames but with the same IP's that are already present on the firewall in other groups, how can we avoid them being not moved from their group but just instead add the new hosts to the new group that is specified in the script?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 17:42:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116049#M512</guid>
      <dc:creator>tawsif</dc:creator>
      <dc:date>2021-04-14T17:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Checkpoint Module - check_point.mgmt.cp_mgmt_host</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116053#M513</link>
      <description>&lt;P&gt;If you have the same IP, but a different name for the host object, it will emit a warning regarding the duplicate IP, but Ansible would not consider them the same object (and therefore not try to update the groups for the old object).&lt;/P&gt;
&lt;P&gt;The conflict only occurs if you are trying to create host objects with the same name as an existing one.&lt;/P&gt;
&lt;P&gt;As long as the group is managed only by Ansible and the script is aware of the entire list of members for that group, that is not a problem either way if you change the membership configuration from being done per host, to being done with the group module:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    - name: add-network-group
      check_point.mgmt.cp_mgmt_group:
          name: ExampleGroup
          comments: "anything"
          state: present
          members:
            "{{ list_of_hosts }}"
          auto_publish_session: yes&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, check out our&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk167210" target="_self"&gt;Generic Data Center feature&lt;/A&gt;. If you have a very dynamic environment this might be even better than updating objects and groups.&amp;nbsp;&lt;SPAN&gt;There is no need to install policy for the updates to take effect.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;PS: If you don't have a lab environment to test your Ansible script against, you can use the SmartConsole demo mode for that.&lt;BR /&gt;After starting a new demo session from SmartConsole, copy the server IP address and use &lt;STRONG&gt;admin/demo123&lt;/STRONG&gt; as your credentials.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 18:05:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116053#M513</guid>
      <dc:creator>Jonas_Rosenboom</dc:creator>
      <dc:date>2021-04-14T18:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Checkpoint Module - check_point.mgmt.cp_mgmt_host</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116061#M514</link>
      <description>&lt;P&gt;Is there a way, may be another module which can check if the same host exist then it can just error out? What if I want to create different groups with the same hosts but the same hosts can exist in multiple groups? Because there are different team members who works on different tasks and may not be able to check if the host is already present on the Firewall.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 20:19:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116061#M514</guid>
      <dc:creator>tawsif</dc:creator>
      <dc:date>2021-04-14T20:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible Checkpoint Module - check_point.mgmt.cp_mgmt_host</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116119#M517</link>
      <description>&lt;P&gt;If you don't specify &lt;STRONG&gt;ignore_errors: yes&amp;nbsp;&lt;/STRONG&gt;the &lt;EM&gt;&lt;STRONG&gt;cp_mgmt_host&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp; module will error out and not continue if an object with the same IP already exists.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"msg": "Checkpoint device returned error 400 with message {u'message': u'Validation failed with 1 warning', u'code': u'err_validation_failed', u'warnings': [{u'message': u'Multiple objects have the same IP address 203.0.113.1'}]} Unpublished changes were discarded"}&lt;/LI-CODE&gt;
&lt;P&gt;If you want to have different groups with the same hosts in them, you can repeat the &lt;STRONG&gt;cp_mgmt_group&lt;/STRONG&gt; module:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  - name: add-network-group
    check_point.mgmt.cp_mgmt_group:
      name: FirstExampleGroup
      state: present
      members: "{{ hosts_in_group }}"
      auto_publish_session: yes

  - name: add-network-group
    check_point.mgmt.cp_mgmt_group:
      name: SecondExampleGroup
      state: present
      members: "{{ hosts_in_group }}"
      auto_publish_session: yes&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The key is to &lt;STRONG&gt;&lt;U&gt;NOT&lt;/U&gt; &lt;/STRONG&gt;specify the &lt;STRONG&gt;groups&amp;nbsp;&lt;/STRONG&gt;parameter for the &lt;STRONG&gt;cp_mgmt_host&amp;nbsp;&lt;/STRONG&gt;module, as that would change all group memberships to match your input.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 12:54:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-Checkpoint-Module-check-point-mgmt-cp-mgmt-host/m-p/116119#M517</guid>
      <dc:creator>Jonas_Rosenboom</dc:creator>
      <dc:date>2021-04-15T12:54:53Z</dc:date>
    </item>
  </channel>
</rss>

