zuul-jobs/roles/install-docker/tasks/mirror.yaml
Jens Harbott b43e406edd Alwas use pathless docker mirror URI
It seems that we need the pathless docker mirror URI for distro docker
now, too, so set it unconditionally.

Change-Id: Ic6918312ec60efba0397b85ee16d91c6393ee90b
2018-12-17 13:42:02 +00:00

24 lines
481 B
YAML

- name: Create docker directory
become: yes
file:
state: directory
path: /etc/docker
- name: Set docker_mirror fact
when:
- docker_mirror is not defined
- mirror_fqdn is defined
set_fact:
docker_mirror: "http://{{ mirror_fqdn }}:8082"
- name: Install dockerhub proxy configuration
become: yes
when:
- docker_mirror is defined
template:
dest: /etc/docker/daemon.json
group: root
mode: 0644
owner: root
src: daemon.json.j2