summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@afrolegs.com>2016-09-01 13:48:07 -0400
committerGitHub <noreply@github.com>2016-09-01 13:48:07 -0400
commite4408a3a405439731e12349336bc35d8eb178a50 (patch)
tree573af17875c0e08d3b34f98dd4c032ca4f563225
parent84c220e5e68fa8ead1f15b9af928c42c12ce853b (diff)
parent43e9680b4ea8fe2343d13103081a5717f7f2b32e (diff)
downloadopenshift-e4408a3a405439731e12349336bc35d8eb178a50.tar.gz
openshift-e4408a3a405439731e12349336bc35d8eb178a50.tar.bz2
openshift-e4408a3a405439731e12349336bc35d8eb178a50.tar.xz
openshift-e4408a3a405439731e12349336bc35d8eb178a50.zip
Merge pull request #2316 from mkumatag/fix_error
Fix errors in docker role
-rw-r--r--roles/docker/tasks/main.yml7
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 87a4e7af0..a89f5b91a 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -67,7 +67,7 @@
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
+ when: item.reg_fact_val != '' and docker_check.stat.isreg is defined and docker_check.stat.isreg
with_items:
- reg_conf_var: ADD_REGISTRY
reg_fact_val: "{{ docker_additional_registries | default(None, true)}}"
@@ -96,7 +96,8 @@
reg_fact_val: "{{ docker_no_proxy | default('') | join(',') }}"
notify:
- restart docker
- when: "{{ 'http_proxy' in openshift.common or 'https_proxy' in openshift.common and docker_check.stat.isreg }}"
+ when:
+ - docker_check.stat.isreg is defined and docker_check.stat.isreg and '"http_proxy" in openshift.common or "https_proxy" in openshift.common'
- name: Set various Docker options
lineinfile:
@@ -108,7 +109,7 @@
{% if docker_log_options is defined %} {{ docker_log_options | oo_split() | oo_prepend_strings_in_list('--log-opt ') | join(' ')}}{% endif %}\
{% if docker_options is defined %} {{ docker_options }}{% endif %}\
{% if docker_disable_push_dockerhub is defined %} --confirm-def-push={{ docker_disable_push_dockerhub | bool }}{% endif %}'"
- when: docker_check.stat.isreg
+ when: docker_check.stat.isreg is defined and docker_check.stat.isreg
notify:
- restart docker