I\'ve tried this:
- name: Log into Docker registry command: docker login --username \"{{ docker_registry_username }}\" --password-stdin stdin: \"{{ docke
Sounds like you want to use the Ansible expect module. See https://docs.ansible.com/ansible/latest/modules/expect_module.html.
Hope this helps.