CheckPointAnsibleMgmtCollection
CheckPointAnsibleMgmtCollection copied to clipboard
cp_mgmt_access_rule_facts - does not show all rules
Hi there,
via ansible calling the function cp_mgmt_access_rule_facts implicates that you can see all existing rules. That is not the case. You only see the first layer but when you use inline layer - multiple times - they are not visible. Instead you need to run a very complicated way to read all rules - parse for inline layer and for each inline layer you need to do the same.
Problem is: Ansible is not made for that! So please add this to your library. Otherwise this function is useless when you use inline layer.
Hi,
Since Ansible resources rely on the Management API, they are limited to its capabilities. Because our Management API does not support this, it cannot be applied in Ansible playbooks.
In some cases, you can work around this by using loops. Here is a link from the Ansible documentation:
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html
Best regards, Dor
But thats answer is not correct. The idea behind ansible is to have a smooth and readable task management. Ansible was never been developed to loop into infinity section headers or even inline layers. Therefore this library exists - written in python. So please improve your library and implement it the correct way! Show access-list means clearly that this command is displaying all access rules - not half - not with an exclusion of inline layers or whatever. In 2025 it can not be so hard to code something which simply works and does what everybody would expect.