Skip to content
Snippets Groups Projects
Unverified Commit 097bec47 authored by axelgobletbdr's avatar axelgobletbdr Committed by GitHub
Browse files

fixed bug in etcd retention where backups are not sorted by date (#6860)

* fixed bug in etcd retention where backups are not sorted by date

* added directory filter to find command
parent d36b5d7d
No related branches found
No related tags found
No related merge requests found
......@@ -62,5 +62,5 @@
- name: Remove old etcd backups
shell:
chdir: "{{ etcd_backup_prefix }}"
cmd: "find . -name 'etcd-*' | head -n -{{ etcd_backup_retention_count }} | xargs rm -rf"
cmd: "find . -name 'etcd-*' -type d | sort -n | head -n -{{ etcd_backup_retention_count }} | xargs rm -rf"
when: etcd_backup_retention_count >= 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment