<?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 Creating a new firewall policy with Ansible in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Creating-a-new-firewall-policy-with-Ansible/m-p/210561#M786</link>
    <description>&lt;P&gt;I have seen it asked before but haven't found a clear answer.&lt;/P&gt;&lt;P&gt;Currently im managing a firewall policy via Ansible. When I need to make big changes I just delete all rules and sections and load the new ones.&lt;/P&gt;&lt;P&gt;I would like to load the new rules in a different policy and then eventually install that policy. Afterwards perhaps deleting the old policy and use that process for future changes,&lt;/P&gt;&lt;P&gt;But it seems the Check Point Ansible modules don't do much with policies. I can do something with layers, but with the layer it is unclear to me in which policy it will be created.&lt;/P&gt;&lt;P&gt;Is it correct that policy creation is not done in Ansible?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 15:01:53 GMT</pubDate>
    <dc:creator>boneyard</dc:creator>
    <dc:date>2024-04-05T15:01:53Z</dc:date>
    <item>
      <title>Creating a new firewall policy with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Creating-a-new-firewall-policy-with-Ansible/m-p/210561#M786</link>
      <description>&lt;P&gt;I have seen it asked before but haven't found a clear answer.&lt;/P&gt;&lt;P&gt;Currently im managing a firewall policy via Ansible. When I need to make big changes I just delete all rules and sections and load the new ones.&lt;/P&gt;&lt;P&gt;I would like to load the new rules in a different policy and then eventually install that policy. Afterwards perhaps deleting the old policy and use that process for future changes,&lt;/P&gt;&lt;P&gt;But it seems the Check Point Ansible modules don't do much with policies. I can do something with layers, but with the layer it is unclear to me in which policy it will be created.&lt;/P&gt;&lt;P&gt;Is it correct that policy creation is not done in Ansible?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 15:01:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Creating-a-new-firewall-policy-with-Ansible/m-p/210561#M786</guid>
      <dc:creator>boneyard</dc:creator>
      <dc:date>2024-04-05T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new firewall policy with Ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/Creating-a-new-firewall-policy-with-Ansible/m-p/210576#M787</link>
      <description>&lt;P&gt;I believe what you are looking for is the cp_mgmt_package module to create a new policy and new Access Control layer, then use the cp_mgmt_access_rule module to add rules.&lt;/P&gt;
&lt;P&gt;Documentation and examples for the modules can be found here:&amp;nbsp;&lt;A href="https://docs.ansible.com/ansible/devel/collections/check_point/mgmt/index.html" target="_blank"&gt;https://docs.ansible.com/ansible/devel/collections/check_point/mgmt/index.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Process flow:&lt;/P&gt;
&lt;P&gt;1. Create a brand new policy package with the cp_mgmt_package module, and add the access layer at the same time.&lt;/P&gt;
&lt;P&gt;2. Add access rules with the cp_mgmt_access_rule or cp_mgmt_access_rules modules to the access layer in the new policy package. Both modules are designed to add/modify rules to access layer policies but have their own pros/cons depending on your situation.&lt;/P&gt;
&lt;P&gt;3. Install the new policy over the existing policy on your gateway.&lt;/P&gt;
&lt;P&gt;4. Delete the old unused policy package, manually or with the cp_mgmt_package module.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 18:21:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Creating-a-new-firewall-policy-with-Ansible/m-p/210576#M787</guid>
      <dc:creator>Erik_Lagzdins</dc:creator>
      <dc:date>2024-04-05T18:21:14Z</dc:date>
    </item>
  </channel>
</rss>

