unbeliveable ... but that was it !! 
Thanks a lot :)

Am Mittwoch, 7. März 2018 22:07:53 UTC+1 schrieb necc...@gmail.com:
>
> Hi all,
>
> the following task may sound easy but actually it fails all the time ...
>
> I want to store my password in a variable and put it into an ansible-vault 
> encrypted file.
> The content of this file will look like this:
>
> ---
> root_pass_sirius: "{{ TesT1234 }}"
>
> Now my check.yml shall read the encrypted file, get the password and login
>
> ---
> - hosts: sirius
>   remote_user: ansible
> #  gather_facts: no
>   become: yes
>   become_method: su
>   vars_files:
>      - enc_vars.yml
>
>   vars:
>      ansible_become_pass: '{{ root_pass_sirius }}'
>
>
> But the login fails with:
>
> FAILED! => {
>     "msg": "The field 'become_pass' has an invalid value, which includes 
> an undefined variable. The error was: {{ Test1234 }}: 'TesT1234' is 
> undefined\nexception type: <class 
> 'ansible.errors.AnsibleUndefinedVariable'>\nexception: {{ TesT1234 }}: 
> 'TesT1234' is undefined"
> }
>
> So it looks like ansible is unable to get the variable out of the 
> encrypted file ... but WHY ?
>
>

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c03058c4-c5d8-4fe3-b1ac-80db19521b24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to