diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-08-24 17:24:41 -0400 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-09-21 15:27:28 -0400 |
commit | b35272a794a572f60034293dd8cb7f057cf3fc8c (patch) | |
tree | 638339fb7d7b9b9bbc64326a4c0c160d9405a063 /roles/docker/tasks | |
parent | 457e0f80784820b9ff0fb6a7407c271731f5b1d9 (diff) | |
download | openshift-b35272a794a572f60034293dd8cb7f057cf3fc8c.tar.gz openshift-b35272a794a572f60034293dd8cb7f057cf3fc8c.tar.bz2 openshift-b35272a794a572f60034293dd8cb7f057cf3fc8c.tar.xz openshift-b35272a794a572f60034293dd8cb7f057cf3fc8c.zip |
Move additional/block/insecure registires to /etc/containers/registries.conf
This commit moves additional/block/insecure registries to
/etc/containers/registries.conf and comments existing lines in
/etc/sysconfig/docker.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1460930
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r-- | roles/docker/tasks/package_docker.yml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml index 16aea5067..0c5621259 100644 --- a/roles/docker/tasks/package_docker.yml +++ b/roles/docker/tasks/package_docker.yml @@ -53,22 +53,22 @@ - stat: path=/etc/sysconfig/docker register: docker_check -- name: Set registry params +- name: Comment old registry params in /etc/sysconfig/docker lineinfile: dest: /etc/sysconfig/docker regexp: '^{{ item.reg_conf_var }}=.*$' - line: "{{ item.reg_conf_var }}='{{ item.reg_fact_val | oo_prepend_strings_in_list(item.reg_flag ~ ' ') | join(' ') }}'" - when: item.reg_fact_val != '' and docker_check.stat.isreg is defined and docker_check.stat.isreg + line: "#{{ item.reg_conf_var }}=''# Moved to {{ containers_registries_conf_path }}" with_items: - reg_conf_var: ADD_REGISTRY - reg_fact_val: "{{ docker_additional_registries | default(None, true)}}" - reg_flag: --add-registry - reg_conf_var: BLOCK_REGISTRY - reg_fact_val: "{{ docker_blocked_registries| default(None, true) }}" - reg_flag: --block-registry - reg_conf_var: INSECURE_REGISTRY - reg_fact_val: "{{ docker_insecure_registries| default(None, true) }}" - reg_flag: --insecure-registry + notify: + - restart docker + +- name: Place additional/blocked/insecure registies in /etc/containers/registries.conf + template: + dest: "{{ containers_registries_conf_path }}" + src: registries.conf notify: - restart docker |