<?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 rules and sections in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115374#M506</link>
    <description>&lt;P&gt;Well, you don't have to use URI module. I'm doing it with Ansible but without CheckPoint modules.&amp;nbsp;I believe CheckPoint modules use the same Web-API calls inside so the parameter position should be there too. It has the parameter in the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/checkpoint_access_rule_module.html" target="_blank"&gt;https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/checkpoint_access_rule_module.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And the cp_mgmt_access_rule module in &lt;A href="https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection" target="_blank"&gt;https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection&lt;/A&gt; includes it too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I decided not to use any of Check Point modules, as they had a bit confusing situation with namings within documents and were not updated for some time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 11:09:02 GMT</pubDate>
    <dc:creator>AlekseiShelepov</dc:creator>
    <dc:date>2021-04-06T11:09:02Z</dc:date>
    <item>
      <title>Ansible rules and sections</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115078#M503</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I know and how to create sections&amp;nbsp; through ansible, but my doubt at moment is how to assign rules to sections?&lt;/P&gt;&lt;P&gt;An old version of checkpoint ansible modules it was possible but not now. Can someone give a example how to now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Nuno&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 01:15:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115078#M503</guid>
      <dc:creator>NUNO_C</dc:creator>
      <dc:date>2021-04-01T01:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible rules and sections</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115107#M504</link>
      <description>&lt;P&gt;You should use&amp;nbsp;&lt;STRONG&gt;position&lt;/STRONG&gt;&amp;nbsp;parameter. For example, using Web-API:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  - name: Add rule - Admin access
    uri:
      url: "https://{{ inventory_hostname }}:443/web_api/add-access-rule"
      method: POST
      body_format: json
      validate_certs: no
      headers:
        x-chkp-sid: "{{ cp_mgmt_session.json.sid }}"
      body: '{ "layer": "{{ cp_mgmt_policy }} Network", "position": { "bottom": "Administration and monitoring" }, "name": "Admin access", "service":[ "SSH", "HTTPS" ], "source": "grp_Admins", "action": "Accept", "track": "Log", "custom-fields": { "field-1": "Ansible automation {{ date }}"} }'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;"position": { "bottom": "Administration and monitoring" }&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;Administration and monitoring is the name of the section in this case.&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Apr 2021 12:02:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115107#M504</guid>
      <dc:creator>AlekseiShelepov</dc:creator>
      <dc:date>2021-04-01T12:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible rules and sections</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115371#M505</link>
      <description>&lt;P&gt;Hi Aleksei,&lt;/P&gt;&lt;P&gt;Thanks for reply, I know it is possible to make those changes via api, but the purpose of my post is to do it via ansible/checkpoint modules. Not to mention this would require 2 extra tasks on ansible to achieve this result (login and logout).&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;N&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 10:33:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115371#M505</guid>
      <dc:creator>NUNO_C</dc:creator>
      <dc:date>2021-04-06T10:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ansible rules and sections</title>
      <link>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115374#M506</link>
      <description>&lt;P&gt;Well, you don't have to use URI module. I'm doing it with Ansible but without CheckPoint modules.&amp;nbsp;I believe CheckPoint modules use the same Web-API calls inside so the parameter position should be there too. It has the parameter in the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/checkpoint_access_rule_module.html" target="_blank"&gt;https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/checkpoint_access_rule_module.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And the cp_mgmt_access_rule module in &lt;A href="https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection" target="_blank"&gt;https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection&lt;/A&gt; includes it too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I decided not to use any of Check Point modules, as they had a bit confusing situation with namings within documents and were not updated for some time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 11:09:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Ansible-rules-and-sections/m-p/115374#M506</guid>
      <dc:creator>AlekseiShelepov</dc:creator>
      <dc:date>2021-04-06T11:09:02Z</dc:date>
    </item>
  </channel>
</rss>

