Hi,

I have the below output  from my playbook using 
- debug:
        msg: "{{ result.stdout }}"

TASK [debug] 
**************************************************************************************************************************
ok: [localhost] => {
    "msg": {
        "access_token": "xxxxxxxxxx",
        "expires_in": 43200,
"token_type": "xxxxxx"
    }
}


 and  when I tried to filter the access token alone  , with map   by
"{{ result.stdout | map('extract', access_token) }}" ., it errors as below

The task includes an option with an undefined variable. The error was: 
'access_token' is  undefined\n\n 

and  when I tried to filter the access token alone  , with map   by
 msg: "{{ result.stdout | map(attribute='access_token') }}" ., it errors as 
below

What I am missing here  to get the desired output  here?


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6a7a5ed1-6c6b-4660-8da9-1388898923fen%40googlegroups.com.

Reply via email to