I want to the fetch the ansible inventory list from an api which accepts a filter parameter. I am wondering if there is any way I can pass this filter parameter to either dynamic inventory or write custom inventory plugin from my playbook?
Ideally, this is how my playbook should look like:
- name: Restart
hosts:
filter_name : Nodes_OnV0
tasks:
- import_role:
<some_role>