Re: [ansible-project] using json_query against integers?

2019-02-13 Thread Matt Martz
Change your `json_query` var to use backticks (``) instead of quotes ('') around the 0 - vars: json_query: "[?lun==`0`]" On Wed, Feb 13, 2019 at 11:34 AM Justin DynamicD wrote: > Ill let a fast sample bit of code do the talking: > > > --- > - name: query test > hosts: "localhost"

[ansible-project] using json_query against integers?

2019-02-13 Thread Justin DynamicD
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']"