NM all ... turns out i need the illustrious backtick (`) and not a single 
quote to denote a integer ...



On Wednesday, February 13, 2019 at 9:34:11 AM UTC-8, Justin DynamicD wrote:
>
> Ill let a fast sample bit of code do the talking:
>
>
> ---
> - name: query test
>   hosts: "localhost"
>   gather_facts: no
>   tasks:
>     - set_fact:
>         drives:
>           - lun: 0
>             size: "25gb"
>           - lun: 1
>             size: "100gb"
>
>     - vars:
>         json_query: "[?lun=='0']"
>       set_fact:
>         output: "{{ drives | json_query(json_query) }}"
>
>     - debug:
>         var: output
>
>
>
> So in the above example, output = [], because json_query looks for a 
> string and not an integer.  If I were to change the dictionary to use only 
> strings I'd have no issues.
>
> So ... does anyone know how to use json_query against integers?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3c124337-fac1-44a3-b1d8-c5d5a4746aa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to