Remove the single commas on all arguments otherwise they will be literally
interpreted as strings.
wild: "{{ lookup(aws_secret='DigiCertCA', bypath=true, region='us-east-1',
aws_access_key='{{dev_access_key}}', aws_secret_key='{{dev_secret_key}}'
)}}"


On Sat, Mar 20, 2021, 10:30 amkur p <[email protected]> wrote:

> Hi Community
>
> I wrote the below playbook to fetch an aws secret, but it says syntax
> error. So can anyone please advise as what might be going wrong ?
>
> Playbook
> ---
> # including vars from vault, containing access and secret key
> - include_vars: ../../../vault_vars.yml
>
> - name: fetch cert key
>   set_fact:
>     wild: "{{ lookup('aws_secret', 'DigiCertCA', bypath=true,
> region='us-east-1', 'aws_access_key'='{{dev_access_key}}',
> 'aws_secret_key'='{{dev_secret_key}}' )}}"
>
>
> Error Message :
>
> fatal: [localhost]: FAILED! => {
>     "msg": "template error while templating string: invalid syntax for
> function call expression. String: {{ lookup('aws_secret', 'DigiCertCA',
> bypath=true, region='us-east-1', 'aws_access_key'='{{dev_access_key}}',
> 'aws_secret_key'='{{dev_secret_key}}' )}}"
> }
>
>
> Regards,
> Amkur
>
> --
> 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/ee899387-6e11-46cd-823b-6c82488d4eb7n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ee899387-6e11-46cd-823b-6c82488d4eb7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAFtje5NkMcrg-AE2yZqvZsiP_pdGw1_q8E9zEvC1kw5xfAQjJQ%40mail.gmail.com.

Reply via email to