summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-08-26 22:15:16 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-08-26 23:25:04 -0400
commit886fab0967834d116bbba2e7d50feb2e13fff11f (patch)
tree43d36d9f531874d6e02d895958b9aaf3fb1126df /roles/openshift_node
parent2595194cc34db43de2d9f139ff7ed1cd41c47ab1 (diff)
downloadopenshift-886fab0967834d116bbba2e7d50feb2e13fff11f.tar.gz
openshift-886fab0967834d116bbba2e7d50feb2e13fff11f.tar.bz2
openshift-886fab0967834d116bbba2e7d50feb2e13fff11f.tar.xz
openshift-886fab0967834d116bbba2e7d50feb2e13fff11f.zip
Bugfix for extra --add-registry in docker config
Diffstat (limited to 'roles/openshift_node')
-rw-r--r--roles/openshift_node/tasks/main.yml24
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