From: Dimitri Savineau Date: Tue, 12 Jan 2021 19:29:58 +0000 (-0500) Subject: container/registry: use password from stdin X-Git-Tag: v6.0.3~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21fa7f31b46fa25aafa3b5dba9b92444c6448c7b;p=ceph-ansible.git container/registry: use password from stdin Pass the password variable via stdin for the registry login authentication. This allows to remove the no_log statement and see the task output without displaying the password value. Signed-off-by: Dimitri Savineau (cherry picked from commit a0e1a450d3cbdcd52a39bd11fd9b8287daabae1f) --- diff --git a/roles/ceph-container-common/tasks/registry.yml b/roles/ceph-container-common/tasks/registry.yml index a9abb3b98..91a08dcbe 100644 --- a/roles/ceph-container-common/tasks/registry.yml +++ b/roles/ceph-container-common/tasks/registry.yml @@ -1,8 +1,10 @@ --- - name: container registry authentication - command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} -p {{ ceph_docker_registry_password | quote }} {{ ceph_docker_registry }}' + command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} --password-stdin {{ ceph_docker_registry }}' + args: + stdin: '{{ ceph_docker_registry_password }}' + stdin_add_newline: no changed_when: false - no_log: true environment: HTTP_PROXY: "{{ ceph_docker_http_proxy | default('') }}" HTTPS_PROXY: "{{ ceph_docker_https_proxy | default('') }}"