diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-11-14 15:16:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 15:16:11 -0500 |
commit | ae34dc20b9e797d6b73576b30b73931beca693ec (patch) | |
tree | d8e3f3d52ae078fbecd19df3cacb4d1bab65986f /playbooks/common/openshift-cluster/upgrades/etcd/rhel_tasks.yml | |
parent | 8e872d99d99c6451ecd28f56931926f30fa1b613 (diff) | |
parent | 371c36eae16644bda921550371da713e63e44fac (diff) | |
download | openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.tar.gz openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.tar.bz2 openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.tar.xz openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.zip |
Merge pull request #2562 from sdodson/etcd3
etcd upgrade playbooks
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/etcd/rhel_tasks.yml')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/etcd/rhel_tasks.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/rhel_tasks.yml b/playbooks/common/openshift-cluster/upgrades/etcd/rhel_tasks.yml new file mode 100644 index 000000000..8e7dc9d9b --- /dev/null +++ b/playbooks/common/openshift-cluster/upgrades/etcd/rhel_tasks.yml @@ -0,0 +1,23 @@ +--- +- name: Verify cluster is healthy pre-upgrade + command: "etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://{{ openshift.common.hostname }}:2379 cluster-health" + +- name: Update etcd package but exclude etcd3 + command: "{{ ansible_pkg_mgr }} install -y etcd-{{ upgrade_version }}\\* --exclude etcd3" + when: upgrade_version | version_compare('3.0','<') + +- name: Update etcd package not excluding etcd3 + command: "{{ ansible_pkg_mgr }} install -y etcd3-{{ upgrade_version }}\\*" + when: not upgrade_version | version_compare('3.0','<') + +- name: Restart etcd + service: + name: etcd + state: restarted + +- name: Verify cluster is healthy + command: "etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://{{ openshift.common.hostname }}:2379 cluster-health" + register: etcdctl + until: etcdctl.rc == 0 + retries: 3 + delay: 10 |