<?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: Access rule creation issue using Ansible. in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/90039#M336</link>
    <description>&lt;P&gt;Thanks for your help and support.&lt;/P&gt;&lt;P&gt;It's working now, i can create a policy as per desire policy package.&lt;/P&gt;&lt;P&gt;Again thanks for your help and support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jun 2020 09:33:08 GMT</pubDate>
    <dc:creator>Abhishek_Kumar1</dc:creator>
    <dc:date>2020-06-29T09:33:08Z</dc:date>
    <item>
      <title>Access rule creation issue using Ansible.</title>
      <link>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89936#M332</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have multiple policy package in my management server.&lt;/P&gt;&lt;P&gt;I am creating a rule using ansible, I want to create a rule in perticular policy package.&lt;/P&gt;&lt;P&gt;But when i am running my playbook, rule is automatic creating in standard policy package.&lt;/P&gt;&lt;P&gt;Even if I use policy installation module, i can install a policy as per my requirement.&lt;/P&gt;&lt;P&gt;================&amp;nbsp;&amp;nbsp; =================&lt;FONT size="6"&gt;&lt;STRONG&gt;=Error=&lt;/STRONG&gt;&lt;/FONT&gt;===================================================&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;"msg": "Unsupported parameters for (cp_mgmt_access_rule) module: policy_package Supported parameters include: action, action_settings, auto_publish_session, comments, content, content_direction, content_negate, custom_fields, destination, destination_negate, details_level, enabled, ignore_errors, ignore_warnings, inline_layer, install_on, layer, name, position, service, service_negate, source, source_negate, state, time, track, user_check, version, vpn, wait_for_task"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;==============================================================================================&lt;/P&gt;&lt;P&gt;I am pasting my module below for your reference&lt;/P&gt;&lt;P&gt;========================================&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: check_point&lt;BR /&gt;connection: httpapi&lt;BR /&gt;tasks:&lt;BR /&gt;- name: Create host object&lt;BR /&gt;cp_mgmt_host:&lt;BR /&gt;color: blue&lt;BR /&gt;ipv4_address: 192.0.2.2&lt;BR /&gt;name: CP_MGMT Host 1&lt;BR /&gt;state: present&lt;BR /&gt;auto_publish_session: true&lt;/P&gt;&lt;P&gt;- name: Create host object&lt;BR /&gt;cp_mgmt_host:&lt;BR /&gt;color: red&lt;BR /&gt;ipv4_address: 192.0.2.3&lt;BR /&gt;name: CP_MGMT Host 2&lt;BR /&gt;state: present&lt;BR /&gt;auto_publish_session: true&lt;/P&gt;&lt;P&gt;- name: Create host object&lt;BR /&gt;cp_mgmt_host:&lt;BR /&gt;color: dark green&lt;BR /&gt;ipv4_address: 192.0.2.4&lt;BR /&gt;name: CP_MGMT Host 3&lt;BR /&gt;state: present&lt;BR /&gt;auto_publish_session: true&lt;/P&gt;&lt;P&gt;- name: Create host object&lt;BR /&gt;cp_mgmt_host:&lt;BR /&gt;color: dark green&lt;BR /&gt;ipv4_address: 192.0.2.5&lt;BR /&gt;name: CP_MGMT Host 5&lt;BR /&gt;state: present&lt;BR /&gt;auto_publish_session: true&lt;/P&gt;&lt;P&gt;- name: add-access-rule&lt;BR /&gt;cp_mgmt_access_rule:&lt;BR /&gt;layer: Network&lt;/P&gt;&lt;P&gt;policy_package: test&lt;BR /&gt;name: mgmt rule&lt;BR /&gt;position: "1"&lt;BR /&gt;action: Accept&lt;BR /&gt;source: any&lt;BR /&gt;destination: CP_MGMT Host 5&lt;BR /&gt;service:&lt;BR /&gt;- https&lt;BR /&gt;- http&lt;BR /&gt;state: present&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- name: add-access-rule&lt;BR /&gt;cp_mgmt_access_rule:&lt;BR /&gt;layer: Network&lt;BR /&gt;policy_package: test&lt;BR /&gt;name: Rule 1&lt;BR /&gt;position: "2"&lt;BR /&gt;action: Accept&lt;BR /&gt;source: CP_MGMT Host 1&lt;BR /&gt;destination: CP_MGMT Host 2&lt;BR /&gt;service:&lt;BR /&gt;- https&lt;BR /&gt;- http&lt;BR /&gt;state: present&lt;/P&gt;&lt;P&gt;- name: publish&lt;BR /&gt;cp_publish:&lt;/P&gt;&lt;P&gt;- name: install-policy&lt;BR /&gt;cp_mgmt_install_policy:&lt;BR /&gt;access: true&lt;BR /&gt;policy_package: test&lt;BR /&gt;targets:&lt;BR /&gt;- cp-gw&lt;BR /&gt;threat_prevention: true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 19:09:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89936#M332</guid>
      <dc:creator>Abhishek_Kumar1</dc:creator>
      <dc:date>2020-06-26T19:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Access rule creation issue using Ansible.</title>
      <link>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89942#M333</link>
      <description>A policy package can contain one or more policy layers. &lt;BR /&gt;A layer can exist in one or more policy packages.&lt;BR /&gt;You must specify the layer you wish for the rule to be added to (by name or uid), not the policy package.</description>
      <pubDate>Fri, 26 Jun 2020 19:59:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89942#M333</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-06-26T19:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Access rule creation issue using Ansible.</title>
      <link>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89961#M334</link>
      <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;/P&gt;&lt;P&gt;Layer is already defined in my playbook&amp;nbsp;&lt;/P&gt;&lt;P&gt;layer:network&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i want to create a rule in specific policy package. how i can add policy package module in my playbook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2020 08:15:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89961#M334</guid>
      <dc:creator>Abhishek_Kumar1</dc:creator>
      <dc:date>2020-06-27T08:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Access rule creation issue using Ansible.</title>
      <link>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89971#M335</link>
      <description>Rules cannot exist in a policy package outside of a layer.&lt;BR /&gt;If you want a rule in a policy package, it must be added to layer in the policy package.&lt;BR /&gt;&lt;BR /&gt;What you are doing is adding a rule to the layer called Network.&lt;BR /&gt;This layer is included in the default Standard policy package.&lt;BR /&gt;The layer you are seeing in SmartConsole associated with your policy package might say "Network" but that's not it's name at the API level.&lt;BR /&gt;It's most likely "MyPolicyPackage Network" but you'd have to use either the show access-layers API or find the screen in SmartConsole that lists all the layers to confirm the correct name.</description>
      <pubDate>Sun, 28 Jun 2020 00:02:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/89971#M335</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-06-28T00:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Access rule creation issue using Ansible.</title>
      <link>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/90039#M336</link>
      <description>&lt;P&gt;Thanks for your help and support.&lt;/P&gt;&lt;P&gt;It's working now, i can create a policy as per desire policy package.&lt;/P&gt;&lt;P&gt;Again thanks for your help and support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 09:33:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Access-rule-creation-issue-using-Ansible/m-p/90039#M336</guid>
      <dc:creator>Abhishek_Kumar1</dc:creator>
      <dc:date>2020-06-29T09:33:08Z</dc:date>
    </item>
  </channel>
</rss>

