kubekey/builtin/core/roles/etcd/tasks/main.yaml
liujian 3885b443ac
fix: change builtin/core architectures (#2718)
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
2025-08-22 21:59:40 +08:00

21 lines
718 B
YAML

---
- include_tasks: prepare.yaml
- name: ETCD | Upgrade etcd if a newer version is available
when:
- .etcd_install_LoadState.stdout | eq "loaded"
- .etcd.etcd_version | semverCompare (printf ">v%s" (index .etcd_install_version "stdout" "etcd Version"))
include_tasks: upgrade.yaml
- name: ETCD | Expand the etcd cluster by adding new nodes if required
when:
- .installed_etcd | empty | not
- .need_installed_etcd | fromJson | empty | not
include_tasks: expansion.yaml
- name: ETCD | Install etcd and set up the backup service if not already present
when: .etcd_install_LoadState.stdout | eq "not-found"
block:
- include_tasks: install.yaml
- include_tasks: backup_service.yaml