summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-03 03:42:52 -0700
committerGitHub <noreply@github.com>2017-10-03 03:42:52 -0700
commit05da1077f81f9579a6d15fd6287dd77cfa494c7a (patch)
treec6065a7ab88947c25a0d0fb318997036b4d198d7
parent57675931e03a488fdd66ba5c45b93e207e2d84eb (diff)
parentf22f8f0fb1c3f4be757b007606c2427538cee864 (diff)
downloadopenshift-05da1077f81f9579a6d15fd6287dd77cfa494c7a.tar.gz
openshift-05da1077f81f9579a6d15fd6287dd77cfa494c7a.tar.bz2
openshift-05da1077f81f9579a6d15fd6287dd77cfa494c7a.tar.xz
openshift-05da1077f81f9579a6d15fd6287dd77cfa494c7a.zip
Merge pull request #5629 from mgugino-upstream-stage/duplicate-docker-regs
Automatic merge from submit-queue. Restore registires to /etc/sysconfig/docker Previously, a commit was added to migrate registires from /etc/sysconfig/docker to /etc/containers/registries.conf We are not currently enforcing a minimum version of docker to consume from this new file, thus some installations are not utilizing the correct repositories. This commit duplicates the registires in both locations to ensure additional/blocked/insecure registries are honored.
-rw-r--r--roles/docker/tasks/package_docker.yml14
1 files changed, 12 insertions, 2 deletions
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml
index 3e81d5c8e..a35335937 100644
--- a/roles/docker/tasks/package_docker.yml
+++ b/roles/docker/tasks/package_docker.yml
@@ -61,15 +61,25 @@
- stat: path=/etc/sysconfig/docker
register: docker_check
-- name: Comment old registry params in /etc/sysconfig/docker
+- name: Set registry params
lineinfile:
dest: /etc/sysconfig/docker
regexp: '^{{ item.reg_conf_var }}=.*$'
- line: "#{{ item.reg_conf_var }}=''# Moved to {{ containers_registries_conf_path }}"
+ line: "{{ item.reg_conf_var }}='{{ item.reg_fact_val | oo_prepend_strings_in_list(item.reg_flag ~ ' ') | join(' ') }}'"
+ when:
+ - item.reg_fact_val != []
+ - docker_check.stat.isreg is defined
+ - docker_check.stat.isreg
with_items:
- reg_conf_var: ADD_REGISTRY
+ reg_fact_val: "{{ l2_docker_additional_registries }}"
+ reg_flag: --add-registry
- reg_conf_var: BLOCK_REGISTRY
+ reg_fact_val: "{{ l2_docker_blocked_registries }}"
+ reg_flag: --block-registry
- reg_conf_var: INSECURE_REGISTRY
+ reg_fact_val: "{{ l2_docker_insecure_registries }}"
+ reg_flag: --insecure-registry
notify:
- restart docker