Andre
Andre

Reputation: 39

Ansible task to cleanup file backups

Is there a way to automatically cleanup backup files ansible creates when useing e.g. the copy or template modules, or to keep the last three backup files for example?

Ansible file backups from template task

Upvotes: 3

Views: 991

Answers (1)

Hoppa
Hoppa

Reputation: 11

I've decided to create my own utility for this as any other way would require extensive Ansible scripting (which in my opinion beats the purpose of Ansible).

https://github.com/moudsen/cleanansiblebackups

Upvotes: 1

Related Questions