same problem, assumed_role is not defined yet, so ansible failed for 
Undefined variable, although I couldn't get the syntax you provided to work 
for the ars var , is that the good syntax ?
I got :
An unhandled exception occurred while templating 
'{{assumed_role|default({}).sts_creds|default({})}}'. Error was a <class 
'ansible.errors.AnsibleError'>, original message: template error while 
templating string: expected token 'end of print statement', got '.'. String: 
{{assumed_role|default({}).sts_creds|default({})}}"




Le lundi 27 juillet 2020 08:50:54 UTC-7, Brian Coca a écrit :
>
> Another option, is to use 'default' filter: 
>
>   environment: 
>       AWS_ACCESS_KEY_ID: "{{ ars.access_key|default('') }}" 
>       AWS_SECRET_ACCESS_KEY: "{{ ars.secret_key|default('') }}" 
>       AWS_SECURITY_TOKEN: "{{ ars.session_token|default('') }}" 
>   vars: 
>        ars: '{{ assumed_role|default({}).sts_creds|default({}) }}' 
>
>
> -- 
> ---------- 
> Brian Coca 
>
>

-- 
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/10019c2b-f36d-4414-b12a-df13a8d963afo%40googlegroups.com.

Reply via email to