That absolutely worked and made a huge difference. so using [] like that selects all entries from the variable being piped into it to query? Is there literature I can read to help understand this facet better?
Thank you again!. On Friday, November 6, 2020 at 12:05:20 PM UTC-5 [email protected] wrote: > On Thu, 5 Nov 2020 at 23:17, [email protected] <[email protected]> > wrote: > > > - name: plate SamAccountName's > > set_fact: > > caughtfish: "{{ chum | json_query(jmesquery) }}" > > vars: > > jmesquery: 'chum.SamAccountName' > > You are already piping 'chum' to json_query, so it should not be part > of the query itself again. > Also, because it's a list, you need to select all entries first with []. > And a relatively simple query like this doesn't need a dedicated variable. > Try this: > > > - name: plate SamAccountName's > set_fact: > caughtfish: "{{ chum | json_query('[].SamAccountName') }}" > > > > > -- > Dick Visser > Trust & Identity Service Operations Manager > GÉANT > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/da6396b6-2768-4644-965f-8d32d0716e45n%40googlegroups.com.
