ansible / ansible-policy

ansible-policy is a prototype implementation which allows us to define and set constraints to the Ansible project in OPA Rego language.
Apache License 2.0
20 stars 10 forks source link

Support is select operator #50

Closed saki-takano closed 2 weeks ago

saki-takano commented 1 month ago

Want to add is select and is selectattr operators as supported in Rulebook. https://ansible.readthedocs.io/projects/rulebook/en/stable/conditions.html#supported-operators

is select: check if an item exists in the list, that satisfies the test defined by operator and value is not select: check if an item does not exist in the list, that does not satisfy the test defined by operator and value is selectattr: check if an object exists in the list, that satisfies the test defined by key, operator and value is not selectattr: check if an object does not exist in the list, that does not satisfy the test defined by key, operator and value

saki-takano commented 2 weeks ago

This issue has been fixed with the PR https://github.com/ansible/ansible-policy/pull/51.