<?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: Unrecognized parameter access-layers in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138814#M629</link>
    <description>&lt;P&gt;It should work. Your positioning cannot be 0. It starts at 1. Also, you cannot move the default layer, but custom.&lt;/P&gt;
&lt;P&gt;Try adding new policy, add some layers, move them out and through API add them again. It worked for me.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 06:03:04 GMT</pubDate>
    <dc:creator>Art_Zalenekas</dc:creator>
    <dc:date>2022-01-19T06:03:04Z</dc:date>
    <item>
      <title>Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138307#M621</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;When executing an Ansible task for &lt;A href="https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/cp_mgmt_package_module.html#ansible-collections-check-point-mgmt-cp-mgmt-package-module" target="_self"&gt;check_point.mgmt.cp_mgmt_package&lt;/A&gt; with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;- name: set policy/package
      check_point.mgmt.cp_mgmt_package:
        name: default-policy
        access: true
        access_layers:
          add:
            - name: default-layer
              position: 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it exits with an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FAILED! =&amp;gt; {"changed": false, "msg": "Checkpoint device returned error 400 with message {u'message': u'Unrecognized parameter [access-layers]', u'code': u'generic_err_invalid_parameter_name'} Unpublished changes were discarded"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong? I think the ansible task is used correctly. (Any other CP-related tasks are working fine.)&lt;BR /&gt;I recognise that the task uses 'access_layers' with an underscore while the error message contains 'access-layers' with a minus. The ansible documentation and examples use the underscore while the corresponding &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html?#cli/set-package~v1.8%20" target="_self"&gt;mgmt-api&lt;/A&gt; uses the minus. Is this a bug/typo?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 17:19:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138307#M621</guid>
      <dc:creator>User1234</dc:creator>
      <dc:date>2022-01-12T17:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138312#M622</link>
      <description>&lt;P&gt;Good question...it could be a typo or a bug, or both actually. That was the first thing I noticed when looking at the output. Lets see if someone else can confirm.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 20:26:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138312#M622</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2022-01-12T20:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138319#M623</link>
      <description>&lt;P&gt;It does work for me. I just added a Shared Layer into position #2. With&amp;nbsp;&lt;EM&gt;remove&lt;/EM&gt; parameter you can take the non-default layers out.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;- name: set policy/package
  check_point.mgmt.cp_mgmt_package:
    name: Home
    access: true
    access_layers:
      add:
        - name: ApplCtrl
          position: 2
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;BR /&gt;Art&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 05:00:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138319#M623</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2022-01-13T05:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138322#M624</link>
      <description>&lt;P&gt;I am also not able to add a shared layer into position 2, same error. I am using the latest version &lt;A href="https://galaxy.ansible.com/check_point/mgmt" target="_self"&gt;2.2.0&lt;/A&gt;.&lt;BR /&gt;So, actually, I want to add a new policy with a new access layer and only have this access layer in the policy. I am grateful for any guidance.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 07:31:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138322#M624</guid>
      <dc:creator>User1234</dc:creator>
      <dc:date>2022-01-13T07:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138377#M625</link>
      <description>&lt;P&gt;Once you create a new policy, it also creates the default policy in the format "&amp;lt;Policy Name&amp;gt; Network". This layer cannot be removed, but you can add another layer above the default policy.&lt;/P&gt;
&lt;P&gt;What version is your management server and are you using MDS environment? I ran Ansible (2.2.0) and&amp;nbsp;&lt;EM&gt;mgmt_cli&lt;/EM&gt;&amp;nbsp;call against R81.10 T22 SMS.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 16:27:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138377#M625</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2022-01-13T16:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138378#M626</link>
      <description>&lt;P&gt;Alright.&lt;/P&gt;&lt;P&gt;It is a fresh installed R81.10 T22 without MDS. Ansible version 2.2.0&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 16:31:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138378#M626</guid>
      <dc:creator>User1234</dc:creator>
      <dc:date>2022-01-13T16:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138381#M627</link>
      <description>&lt;P&gt;OK, so you run exactly the same environment. Try what I said in my statement above.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 16:56:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138381#M627</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2022-01-13T16:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138439#M628</link>
      <description>&lt;P&gt;I am afraid it does not work.&lt;/P&gt;&lt;P&gt;I tried to create the access-layer before and after policy creation and insert it to position 0,1,2,3. Still the same error message.&lt;/P&gt;&lt;P&gt;To be honest, I don't think the server even parses the name and position parameters as it raises an exception at the parameter access-layer which is one level on top.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 09:11:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138439#M628</guid>
      <dc:creator>User1234</dc:creator>
      <dc:date>2022-01-14T09:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unrecognized parameter access-layers</title>
      <link>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138814#M629</link>
      <description>&lt;P&gt;It should work. Your positioning cannot be 0. It starts at 1. Also, you cannot move the default layer, but custom.&lt;/P&gt;
&lt;P&gt;Try adding new policy, add some layers, move them out and through API add them again. It worked for me.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 06:03:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Unrecognized-parameter-access-layers/m-p/138814#M629</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2022-01-19T06:03:04Z</dc:date>
    </item>
  </channel>
</rss>

