upgrade_rpm.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. register: result
  18. until: result is succeeded
  19. - lineinfile:
  20. destfile: "{{ etcd_conf_file }}"
  21. regexp: '^ETCD_QUOTA_BACKEND_BYTES='
  22. line: "ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}"
  23. - name: Restart etcd
  24. service:
  25. name: "{{ etcd_service }}"
  26. state: restarted
  27. - name: Verify cluster is healthy
  28. command: "{{ etcdctlv2 }} cluster-health"
  29. register: etcdctl
  30. until: etcdctl.rc == 0
  31. retries: 3
  32. delay: 10