Closed ronrem closed 5 days ago
Hi @ronrem,
I tested the filtering feature via Postman, it's the same as Ansible. I checked the doc for filtering results and found there's a strict restriction for the pattern value. In your playbook, the service object consists of four items and they're stored in a linear sequence in it. So the service object cannot be found if changing the order in the pattern, which causes the issue of empty results.
The following filter operators are supported:
Operator | Case sensitive | Description -- | -- | -- == | Yes | Pattern must be identical to the value.Thanks for your conformation, unfortunately this filtering feature doesn't fulfil my needs and I'll create my own since this is a limitation on the Fortigate (backend not frontend).
Hi,
I'm using an Ansible playbook to lookup a specific policy in a Fortigate firewall. This works well if this order of the address and/or services object is the same order as the firewall configuration.
Hereby an example for reproducing.
1) The firewall policy contains the following configuration:
2) My Ansible-playbook looks like this:
3) The output of my Ansible-playbook is:
4) When I change the oder of the services in my Ansible-playbook:
5) The Ansible collection is not able to lookup the corresponding policy, the output is like this:
Can we please fix the Ansible collection in a way that the ordering of the object has no dependancy with the ordering is the object in the firewall configuration?
Additional information: