summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-master/private/validate_restart.yml
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2018-02-12 17:46:24 -0500
committerMichael Gugino <mgugino@redhat.com>2018-02-13 16:32:36 -0500
commitcdb1ae5fd0057aa6b666ca53fc54e73ce8be19fa (patch)
tree272b8d3867998590b690af95d56297fbc2a2e348 /playbooks/openshift-master/private/validate_restart.yml
parent864d3bd62d28ea2ac10eaef4b767ce3fc7189bba (diff)
downloadopenshift-cdb1ae5fd0057aa6b666ca53fc54e73ce8be19fa.tar.gz
openshift-cdb1ae5fd0057aa6b666ca53fc54e73ce8be19fa.tar.bz2
openshift-cdb1ae5fd0057aa6b666ca53fc54e73ce8be19fa.tar.xz
openshift-cdb1ae5fd0057aa6b666ca53fc54e73ce8be19fa.zip
Simplify double upgrade version logic
Currently, double upgrade process (3.7 -> 3.9) for control plane attempts to run openshift_version role twice to set the appropriate values for upgrading each major version, 3.8 and 3.9. This commit instructs openshift_version to only inquire about the proper settings for 3.9, and hard-sets the appropriate values for 3.8. This allows a simplification of the openshift_version role, allowing for easier debugging. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1542368
Diffstat (limited to 'playbooks/openshift-master/private/validate_restart.yml')
-rw-r--r--playbooks/openshift-master/private/validate_restart.yml6
1 files changed, 5 insertions, 1 deletions
diff --git a/playbooks/openshift-master/private/validate_restart.yml b/playbooks/openshift-master/private/validate_restart.yml
index 60b0e5bb6..40aaa653c 100644
--- a/playbooks/openshift-master/private/validate_restart.yml
+++ b/playbooks/openshift-master/private/validate_restart.yml
@@ -33,6 +33,7 @@
- stat: path="{{ hostvars.localhost.mktemp.stdout }}"
register: exists
changed_when: false
+ when: "'stdout' in hostvars.localhost.mktemp"
- name: Cleanup temp file on localhost
hosts: localhost
@@ -41,6 +42,7 @@
tasks:
- file: path="{{ hostvars.localhost.mktemp.stdout }}" state=absent
changed_when: false
+ when: "'stdout' in hostvars.localhost.mktemp"
- name: Warn if restarting the system where ansible is running
hosts: oo_masters_to_config
@@ -54,7 +56,9 @@
must be verified manually. To only restart services, set
openshift_master_rolling_restart_mode=services in host
inventory and relaunch the playbook.
- when: exists.stat.exists and openshift.common.rolling_restart_mode == 'system'
+ when:
+ - "'stat' in exists"
+ - exists.stat.exists and openshift.common.rolling_restart_mode == 'system'
- set_fact:
current_host: "{{ exists.stat.exists }}"
when: openshift.common.rolling_restart_mode == 'system'