It's not possible to specify params that GET API calls for different resources may have. Sometimes these params are required which makes the module fail. E.g. with resource: content_view_filters it fails with "content_view_id is required". Since search can't be performed for content_view_filters using search: content_view_id=189, it's impossible to use this module to list content_view_filters.
Suggestion: add params option that would acceps a dictionary of arbitrary parameters.
SUMMARY
It's not possible to specify params that GET API calls for different resources may have. Sometimes these params are required which makes the module fail. E.g. with
resource: content_view_filters
it fails with "content_view_id is required". Sincesearch
can't be performed forcontent_view_filters
usingsearch: content_view_id=189
, it's impossible to use this module to list content_view_filters.Suggestion: add
params
option that would acceps a dictionary of arbitrary parameters.This module uses
list_resource
function https://github.com/theforeman/foreman-ansible-modules/blob/362161115f693cd8e7bda10c98ff9f82a64cbfa4/plugins/modules/foreman_search_facts.py#L119that does accept
params
, which are supposedly exactly what we need. Should be easy to add.ISSUE TYPE