summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks/main.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-03-16 14:30:31 -0400
committerKenny Woodson <kwoodson@redhat.com>2016-03-16 14:58:37 -0400
commit9858a5e56f846b4b7dbb3d19e09f084aacafce82 (patch)
treecd9e770dd4788a83c577275ef09db7528afbfa7c /roles/docker/tasks/main.yml
parente47d3f806da7db924dd8d9e0e533c1a59868fa16 (diff)
downloadopenshift-9858a5e56f846b4b7dbb3d19e09f084aacafce82.tar.gz
openshift-9858a5e56f846b4b7dbb3d19e09f084aacafce82.tar.bz2
openshift-9858a5e56f846b4b7dbb3d19e09f084aacafce82.tar.xz
openshift-9858a5e56f846b4b7dbb3d19e09f084aacafce82.zip
Fixing undefined variable check
Diffstat (limited to 'roles/docker/tasks/main.yml')
-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