wtsi-hgi / hgi-systems

Orchestration and configuration management of hgi systems (using terraform & ansible)
GNU General Public License v3.0
3 stars 3 forks source link

custom ansible filter to allow `jq` filters #16

Closed jrandall closed 7 years ago

jrandall commented 7 years ago

It would be nice if we could use jq filters (https://stedolan.github.io/jq/manual/) for the more complex lookups that can often be very hack-ish using ansible's built-in filters.

We could write a custom filter to pass the data through to pyjq: https://pypi.python.org/pypi/pyjq

colin-nolan commented 7 years ago

@jrandall: Ansible 2.2 introduces a new json_query filter, based on JMESPath. It's not jq but it looks like it would be just as good for complex lookups!