Perfect! Thanks.
On Monday, October 30, 2017 at 1:00:41 PM UTC+11, Pshem Kowalczyk wrote:
>
> You can move the actual query string to a separate variable to reduce some
> clutter and string concatenation. You can also use ` (backticks) to quote
> jmes_path strings:
>
> set_fact:
>
You can move the actual query string to a separate variable to reduce some
clutter and string concatenation. You can also use ` (backticks) to quote
jmes_path strings:
set_fact:
enabled_ports: "{{ intfs | json_query(enabled)}}"
vars:
enabled: "values(@)[?is_enabled
Is there a cleaner alternative to:
'{{ (things | json_query("[?name==''" + thing_name + "'']") }}'
In particular, ideally I want to avoid:
- String concatenation
- Escaping of quotes
--
You received this message because you are subscribed to the Google Groups
"Ansible Project"