summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/upgrades/etcd/main.yml
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-12-09 11:24:59 -0500
committerScott Dodson <sdodson@redhat.com>2016-12-09 14:46:14 -0500
commit676985466835002e747426434fd75581471da949 (patch)
tree88491c844b1d16860283244845a51edea9a2286d /playbooks/common/openshift-cluster/upgrades/etcd/main.yml
parent68bd0d9d8318bedd36c2ff45b70a6db0329248c6 (diff)
downloadopenshift-676985466835002e747426434fd75581471da949.tar.gz
openshift-676985466835002e747426434fd75581471da949.tar.bz2
openshift-676985466835002e747426434fd75581471da949.tar.xz
openshift-676985466835002e747426434fd75581471da949.zip
[upgrades] Upgrade etcd by default
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/etcd/main.yml')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/main.yml15
1 files changed, 11 insertions, 4 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/main.yml b/playbooks/common/openshift-cluster/upgrades/etcd/main.yml
index c67cf282f..62ea1fe48 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/main.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/main.yml
@@ -9,24 +9,30 @@
tags:
- always
+# We use two groups one for hosts we're upgrading which doesn't include embedded etcd
+# The other for backing up which includes the embedded etcd host, there's no need to
+# upgrade embedded etcd that just happens when the master is updated.
- name: Evaluate additional groups for upgrade
hosts: localhost
connection: local
become: no
tasks:
- - fail:
- msg: 'The etcd upgrade playbook does not support upgrading embedded etcd, simply run the normal playbooks and etcd will be upgraded when your master is updated.'
- when: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- name: Evaluate etcd_hosts_to_upgrade
add_host:
name: "{{ item }}"
- groups: etcd_hosts_to_upgrade, etcd_hosts_to_backup
+ groups: etcd_hosts_to_upgrade
+ with_items: "{{ groups.oo_etcd_to_config if groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config | length > 0 else [] }}"
+ - name: Evaluate etcd_hosts_to_backup
+ add_host:
+ name: "{{ item }}"
+ groups: etcd_hosts_to_backup
with_items: "{{ groups.oo_etcd_to_config if groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config | length > 0 else groups.oo_first_master }}"
- name: Backup etcd before upgrading anything
include: backup.yml
vars:
backup_tag: "pre-upgrade-"
+ when: openshift_upgrade_etcd_backup | default(true) | bool
- name: Drop etcdctl profiles
hosts: etcd_hosts_to_upgrade
@@ -125,3 +131,4 @@
include: backup.yml
vars:
backup_tag: "post-3.0-"
+ when: openshift_upgrade_etcd_backup | default(true) | bool