90fc18f621
So that the docker mirror configuration can be used without the install-docker role (e.g., if another process is used to install docker on a target host), split the part of the role which configures mirrors into its own role and include it in the install-docker role. Change-Id: I7cd7f61e2d1281cd2949c1f69a081c7217d0d328
24 lines
481 B
YAML
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
|