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/CAL8fbwNrd7DQd%3D3HX1TMFGKcw7MiRwKFf2999ZK3xkagpvAe1w%40mail.gmail.com.

Reply via email to