Sets up docker to use pass for authentication via docker_credential_helpers
- Docker
If following security best practice and running docker as non-root user, note that due to tty owership requirements, this role is effective only when both:
- docker
- docker_credential_helpers
have been installed and configured BEFORE running
docker_pass.
Role tested on:
- docker-ce | 5:18.09.1
3-0ubuntu-xenial
- Ubuntu:
- Bionic 18.04 (LTS) (x64)
See examples in vars folder
None
Given playbook_path/file_name:
- name: Use docker-credential-pass for authentication
hosts: docker_hosts
gather_facts: yes
remote_user: "{{ docker_user.name }}"
vars:
ansible_ssh_private_key_file: "{{ docker_user.private_key }}"
roles:
- docker_pass
run:
ansible-playbook -i inventory_path playbook_path/file_name.yaml
BSD
Uzo Agu