<?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 Enable the access rule to  correct-policy package in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50596#M243</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i am adding the rulebase via ansible&amp;nbsp; and having 2 policy package like "standard and Test_APP" policy package.whatever rule in publishing its going to standard only not going to APP policy&amp;nbsp; package.is there any way to publish the rule to APP policy package.&lt;/P&gt;&lt;P&gt;Please find the below script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- name: "create rule at the top of a section called 'script rules'"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: add-access-rule&lt;BR /&gt;parameters:&lt;BR /&gt;layer: "network"&lt;BR /&gt;name: "created by me"&lt;BR /&gt;position:&lt;BR /&gt;top: "web"&lt;BR /&gt;source:&lt;BR /&gt;- "host2"&lt;BR /&gt;destination:&lt;BR /&gt;- "host3"&lt;BR /&gt;service:&lt;BR /&gt;- "tcp_77"&lt;BR /&gt;action: "accept"&lt;BR /&gt;session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "publish"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: publish&lt;BR /&gt;session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "install policy"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: install-policy&lt;BR /&gt;parameters:&lt;BR /&gt;policy-package: "Test_APP"&lt;BR /&gt;session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;rule is publishing on standard policy package.but policy is installing on Test_APP&amp;nbsp; targeted gateway. i need help on publishing the policy on correct policy package.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aathi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 13:40:53 GMT</pubDate>
    <dc:creator>Aathi</dc:creator>
    <dc:date>2019-04-11T13:40:53Z</dc:date>
    <item>
      <title>Enable the access rule to  correct-policy package</title>
      <link>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50596#M243</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i am adding the rulebase via ansible&amp;nbsp; and having 2 policy package like "standard and Test_APP" policy package.whatever rule in publishing its going to standard only not going to APP policy&amp;nbsp; package.is there any way to publish the rule to APP policy package.&lt;/P&gt;&lt;P&gt;Please find the below script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- name: "create rule at the top of a section called 'script rules'"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: add-access-rule&lt;BR /&gt;parameters:&lt;BR /&gt;layer: "network"&lt;BR /&gt;name: "created by me"&lt;BR /&gt;position:&lt;BR /&gt;top: "web"&lt;BR /&gt;source:&lt;BR /&gt;- "host2"&lt;BR /&gt;destination:&lt;BR /&gt;- "host3"&lt;BR /&gt;service:&lt;BR /&gt;- "tcp_77"&lt;BR /&gt;action: "accept"&lt;BR /&gt;session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "publish"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: publish&lt;BR /&gt;session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "install policy"&lt;BR /&gt;check_point_mgmt:&lt;BR /&gt;command: install-policy&lt;BR /&gt;parameters:&lt;BR /&gt;policy-package: "Test_APP"&lt;BR /&gt;session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;rule is publishing on standard policy package.but policy is installing on Test_APP&amp;nbsp; targeted gateway. i need help on publishing the policy on correct policy package.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aathi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 13:40:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50596#M243</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-11T13:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Enable the access rule to  correct-policy package</title>
      <link>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50604#M244</link>
      <description>&lt;P&gt;I don't know enough about ansible, but when using the mgmt_cli tool I have to reference the policy name as well as the layer in order for the rule to be accepted.&lt;/P&gt;
&lt;P&gt;If you change your playbook from:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;check_point_mgmt:
command: add-access-rule
parameters:
layer: "network"
name: "created by me"
....&lt;/LI-CODE&gt;
&lt;P&gt;To:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;check_point_mgmt:
command: add-access-rule
parameters:
layer: "Test_APP Network"
name: "created by me"
position:&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does it put the access rule in the proper policy package and layer?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 14:16:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50604#M244</guid>
      <dc:creator>masher</dc:creator>
      <dc:date>2019-04-11T14:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Enable the access rule to  correct-policy package</title>
      <link>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50674#M245</link>
      <description>When you add a rule, it must be added to the correct policy layer.&lt;BR /&gt;You can only install a policy package to a gateway, which contains one or more layers.&lt;BR /&gt;Can you verify your rule is being added to the correct layer?</description>
      <pubDate>Fri, 12 Apr 2019 01:39:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50674#M245</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-12T01:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Enable the access rule to  correct-policy package</title>
      <link>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50680#M246</link>
      <description>&lt;P&gt;Thanks Team for your excellent support and guidance.&lt;/P&gt;&lt;P&gt;Now i m able to publish the policy in correct policy package.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aathi&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 03:03:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Enable-the-access-rule-to-correct-policy-package/m-p/50680#M246</guid>
      <dc:creator>Aathi</dc:creator>
      <dc:date>2019-04-12T03:03:14Z</dc:date>
    </item>
  </channel>
</rss>

