How to use command stdin in Ansible?

前端 未结 3 1694
别那么骄傲
别那么骄傲 2020-12-21 04:16

I\'ve tried this:

- name: Log into Docker registry
  command: docker login --username \"{{ docker_registry_username }}\" --password-stdin
  stdin: \"{{ docke         


        
3条回答
  •  轮回少年
    2020-12-21 05:02

    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.

提交回复
热议问题