You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
951 B

  1. ---
  2. - name: Get currently-deployed etcd version
  3. command: "{{ bin_dir }}/etcd --version"
  4. register: etcd_current_host_version
  5. # There's a chance this play could run before etcd is installed at all
  6. ignore_errors: true
  7. when: etcd_cluster_setup
  8. - name: Restart etcd if necessary
  9. command: /bin/true
  10. notify: Restart etcd
  11. when:
  12. - etcd_cluster_setup
  13. - etcd_version.lstrip('v') not in etcd_current_host_version.stdout | default('')
  14. - name: Restart etcd-events if necessary
  15. command: /bin/true
  16. notify: Restart etcd-events
  17. when:
  18. - etcd_events_cluster_setup
  19. - etcd_version.lstrip('v') not in etcd_current_host_version.stdout | default('')
  20. - name: Install | Copy etcd binary from download dir
  21. copy:
  22. src: "{{ local_release_dir }}/etcd-{{ etcd_version }}-linux-{{ host_architecture }}/{{ item }}"
  23. dest: "{{ bin_dir }}/{{ item }}"
  24. mode: 0755
  25. remote_src: yes
  26. with_items:
  27. - etcd
  28. when: etcd_cluster_setup