Don't write docker proxy config if docker_mirror undef
If docker_mirror isn't set, we set one. But if we do it when mirror_fqdn isn't set, we get a bogus value. Put in guards for that so that we don't write out bad values. Change-Id: Ie56d9a83fbabcc99420ce28a8a8f1bb562db0470
This commit is contained in:
parent
899bd89833
commit
b640d5c97a
@ -7,6 +7,7 @@
|
||||
- name: Set docker_mirror fact for upstream docker
|
||||
when:
|
||||
- docker_mirror is not defined
|
||||
- mirror_fqdn is defined
|
||||
- use_upstream_docker
|
||||
set_fact:
|
||||
docker_mirror: "http://{{ mirror_fqdn }}:8082"
|
||||
@ -14,12 +15,15 @@
|
||||
- name: Set docker_mirror fact for distro docker
|
||||
when:
|
||||
- docker_mirror is not defined
|
||||
- mirror_fqdn is defined
|
||||
- not use_upstream_docker
|
||||
set_fact:
|
||||
docker_mirror: "http://{{ mirror_fqdn }}:8081/registry-1.docker/"
|
||||
|
||||
- name: Install dockerhub proxy configuration
|
||||
become: yes
|
||||
when:
|
||||
- docker_mirror is defined
|
||||
template:
|
||||
dest: /etc/docker/daemon.json
|
||||
group: root
|
||||
|
Loading…
Reference in New Issue
Block a user