diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 18f0ce064..7679adbf3 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -66,7 +66,7 @@ - name: Secure OpenShift Registry lineinfile: dest: /etc/sysconfig/docker - regexp: '^OPTIONS=.*' + regexp: '^OPTIONS=.*$' line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }} \ {% if ansible_selinux and ansible_selinux.status == '''enabled''' %}--selinux-enabled{% endif %}'" when: docker_check.stat.isreg @@ -74,27 +74,29 @@ - restart docker - set_fact: - docker_additional_registries: "registry.access.redhat.com,{{ lookup('oo_option', 'docker_additional_registries') }}" - when: deployment_type == 'enterprise' + docker_additional_registries: "{{ lookup('oo_option', 'docker_additional_registries') + | oo_split() | union(['registry.access.redhat.com']) + | difference(['']) }}" + when: openshift.common.deployment_type == 'enterprise' - set_fact: - docker_additional_registries: "{{ lookup('oo_option', 'docker_additional_registries') }}" - when: deployment_type != 'enterprise' + docker_additional_registries: "{{ lookup('oo_option', 'docker_additional_registries') + | oo_split() | difference(['']) }}" + when: openshift.common.deployment_type != 'enterprise' - name: Add personal registries lineinfile: dest: /etc/sysconfig/docker - regexp: '^ADD_REGISTRY=.*' - line: "ADD_REGISTRY='{{ docker_additional_registries | oo_split() - | oo_prepend_strings_in_list('--add-registry ') | join(' ') }}'" - when: docker_check.stat.isreg and - docker_additional_registries != '' + regexp: '^ADD_REGISTRY=.*$' + line: "ADD_REGISTRY='{{ docker_additional_registries + | oo_prepend_strings_in_list('--add-registry ') | join(' ') }}'" + when: docker_check.stat.isreg and docker_additional_registries notify: - restart docker - name: Block registries lineinfile: dest: /etc/sysconfig/docker - regexp: '^BLOCK_REGISTRY=.*' + regexp: '^BLOCK_REGISTRY=.*$' line: "BLOCK_REGISTRY='{{ lookup('oo_option', 'docker_blocked_registries') | oo_split() | oo_prepend_strings_in_list('--block-registry ') | join(' ') }}'" when: docker_check.stat.isreg and |