Re: [ansible-project] Obfuscate password in the Ansible Vault

2020-02-19 Thread Vishal Bobade
Hi,

Do encrypt your string with ansible-vault encrypt command and assign a
variable to it.

You can use that variable in vars Or defaults dir in any role.



Check below link.

https://docs.ansible.com/ansible/latest/user_guide/vault.html


On Wed, 19 Feb, 2020, 8:51 PM Poemy,  wrote:

> Hi,
>
> My playbook installs Docker on a remote server, and logs in on a docker
> registry by using user credentials, specified by following task
> - name: Log into FIS registry
>   docker_login:
> registry: my-company-docker-registry
> username: my-user-account
> password: my-password-in-plain-text
>
> Now, what I want to achieve is that my password is stored in the ansible
> vault and gets decrypted back from the ansible vault.
> This to have no plain password anymore in my playbook.
> But how do I achieve this?
>
> --
> 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/7e116a8b-4fcc-4b80-b02e-0a4bb0b2ce1f%40googlegroups.com
> 
> .
>

-- 
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/CAJWgDibP18-2o%3D%3D%3D7Wsr_UXT9xmdF2h%3DS%3DP4CObwzf%3D9h8vxOw%40mail.gmail.com.


[ansible-project] Obfuscate password in the Ansible Vault

2020-02-19 Thread Poemy
Hi,

My playbook installs Docker on a remote server, and logs in on a docker 
registry by using user credentials, specified by following task
- name: Log into FIS registry
  docker_login:
registry: my-company-docker-registry
username: my-user-account
password: my-password-in-plain-text

Now, what I want to achieve is that my password is stored in the ansible 
vault and gets decrypted back from the ansible vault.
This to have no plain password anymore in my playbook.
But how do I achieve this?

-- 
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/7e116a8b-4fcc-4b80-b02e-0a4bb0b2ce1f%40googlegroups.com.