upgrade_rpm.yml 873 B

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. # INPUT r_etcd_upgrade_version?
  3. # F23 GA'd with etcd 2.0, currently has 2.2 in updates
  4. # F24 GA'd with etcd-2.2, currently has 2.2 in updates
  5. # F25 Beta currently has etcd 3.0
  6. # RHEL 7.3.4 with etcd-3.1.3-1.el7
  7. # RHEL 7.3.3 with etcd-3.1.0-2.el7
  8. # RHEL 7.3.2 with etcd-3.0.15-1.el7
  9. - name: Verify cluster is healthy pre-upgrade
  10. command: "{{ etcdctlv2 }} cluster-health"
  11. - set_fact:
  12. l_etcd_target_package: "{{ 'etcd' if r_etcd_upgrade_version is not defined else 'etcd-'+r_etcd_upgrade_version+'*' }}"
  13. - name: Update etcd RPM to {{ l_etcd_target_package }}
  14. package:
  15. name: "{{ l_etcd_target_package }}"
  16. state: latest
  17. - name: Restart etcd
  18. service:
  19. name: "{{ etcd_service }}"
  20. state: restarted
  21. - name: Verify cluster is healthy
  22. command: "{{ etcdctlv2 }} cluster-health"
  23. register: etcdctl
  24. until: etcdctl.rc == 0
  25. retries: 3
  26. delay: 10