Przeglądaj źródła

Tolerate non existence of /etc/sysconfig/atomic-openshift-master

Scott Dodson 7 lat temu
rodzic
commit
fbb5f4c002
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      roles/openshift_master/tasks/main.yml

+ 2 - 2
roles/openshift_master/tasks/main.yml

@@ -133,12 +133,12 @@
 - block:
     - name: check whether our docker-registry setting exists in the env file
       command: "awk '/^OPENSHIFT_DEFAULT_REGISTRY=docker-registry.default.svc:5000/' /etc/sysconfig/{{ openshift.common.service_type }}-master"
-      ignore_errors: true
+      failed_when: false
       changed_when: false
       register: already_set
 
     - set_fact:
-        openshift_push_via_dns: "{{ (openshift_use_dnsmasq | default(true) and openshift.common.version_gte_3_6) or (already_set.stdout | match('OPENSHIFT_DEFAULT_REGISTRY=docker-registry.default.svc:5000')) }}"
+        openshift_push_via_dns: "{{ (openshift_use_dnsmasq | default(true) and openshift.common.version_gte_3_6) or (already_set.stdout is defined and already_set.stdout | match('OPENSHIFT_DEFAULT_REGISTRY=docker-registry.default.svc:5000')) }}"
 
 - name: Set fact of all etcd host IPs
   openshift_facts: