summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-03-16 15:02:41 -0400
committerKenny Woodson <kwoodson@redhat.com>2016-03-16 15:02:41 -0400
commitf02153503d537733c8f9a8bf06a718e9af2ce502 (patch)
tree6ebdc12c107b97afe9fe292c3004cb27e3a025a7 /roles/docker/tasks
parenta9967650345248b3bd89f2420c83e1cbefeafff1 (diff)
parent9858a5e56f846b4b7dbb3d19e09f084aacafce82 (diff)
downloadopenshift-f02153503d537733c8f9a8bf06a718e9af2ce502.tar.gz
openshift-f02153503d537733c8f9a8bf06a718e9af2ce502.tar.bz2
openshift-f02153503d537733c8f9a8bf06a718e9af2ce502.tar.xz
openshift-f02153503d537733c8f9a8bf06a718e9af2ce502.zip
Merge pull request #1629 from kwoodson/docker_fix
Fix for docker role when variables are undefined.
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r--roles/docker/tasks/main.yml8
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 506cecfea..ccbe1d5d5 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -49,16 +49,16 @@
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 is defined and docker_check.stat.isreg
+ when: item.reg_fact_val != '' and docker_check.stat.isreg
with_items:
- reg_conf_var: ADD_REGISTRY
- reg_fact_val: "{{ docker_additional_registries }}"
+ reg_fact_val: "{{ docker_additional_registries | default(None, true)}}"
reg_flag: --add-registry
- reg_conf_var: BLOCK_REGISTRY
- reg_fact_val: "{{ docker_blocked_registries }}"
+ reg_fact_val: "{{ docker_blocked_registries| default(None, true) }}"
reg_flag: --block-registry
- reg_conf_var: INSECURE_REGISTRY
- reg_fact_val: "{{ docker_insecure_registries }}"
+ reg_fact_val: "{{ docker_insecure_registries| default(None, true) }}"
reg_flag: --insecure-registry
notify:
- restart docker