mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 01:29:42 +03:00
Move old etcd backup removal after etcd restart (#9147)
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
- Stat etcd v2 data directory
|
||||
- Backup etcd v2 data
|
||||
- Backup etcd v3 data
|
||||
- Remove old etcd backups
|
||||
when: etcd_cluster_is_healthy.rc == 0
|
||||
|
||||
- name: Refresh Time Fact
|
||||
@@ -61,9 +60,3 @@
|
||||
register: etcd_backup_v3_command
|
||||
until: etcd_backup_v3_command.rc == 0
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
|
||||
- name: Remove old etcd backups
|
||||
shell:
|
||||
chdir: "{{ etcd_backup_prefix }}"
|
||||
cmd: "find . -name 'etcd-*' -type d | sort -n | head -n -{{ etcd_backup_retention_count }} | xargs rm -rf"
|
||||
when: etcd_backup_retention_count >= 0
|
||||
|
||||
Reference in New Issue
Block a user