Re: [ansible-project] vault not decrypting in loops

8 views
Skip to first unread message

P. Varsha

unread,
Apr 3, 2019, 2:22:19 AM4/3/19
to ansible...@googlegroups.com
hello,
try once instead of two quotation use one.
thanks


On Tue, Apr 2, 2019 at 9:01 PM Guillaume D <dubro...@gmail.com> wrote:
  Hello,

In some way, my vault's variables are not decrypted in my playbook

I got a all.yml and vault.yml in the back.

I meet this situation:

  - set_fact:
      secret_list
: "--from-literal={{ item.name }}={{ item[environment] }} {{ (secret_list | default('')) }}"
    with_items
: "{{ zabbix }}"

output:

--from-literal=zabbix_url={{ vault_zabbix_api_url_dev }} --from-literal=zabbix_url={{ vault_zabbix_api_key_dev }}

The value are not decrypted.


This way works when I access directly (not by item):

  - set_fact:      
      secret_list
: "--from-literal=zabbix_url={{ zabbix[0].dev }} --from-literal=zabbix_key={{ vault_zabbix_api_key_dev }}"

output:

--from-literal=zabbix_url=somevalue1 --from-literal=zabbix_url=somevalue2


Do you have any clue?

Thank

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7770fde0-4185-4640-be75-d3b0f7a4ed7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages