I\'ve tried this:
- name: Log into Docker registry command: docker login --username \"{{ docker_registry_username }}\" --password-stdin stdin: \"{{ docke
Why do you use command/shell to log into Docker registry? Ansible has docker_login module for that: https://docs.ansible.com/ansible/latest/modules/docker_login_module.html it's in preview, from community, but it works.
You can create vault file with sensitive data.