Ansible Template Module Backup - Manage Number of Backup Copies

Hello.

I am using the Ansible template module and create a backup file each change that is pushed. Over time these backup files become large in number as more and more changes are pushed out. In my case it only makes sense to maintain a small number of backup copies. Is it possible to configure / develop an upper limit on the number of backup files maintained? This would be much easier for users like me rather than building additional ansible tasks to clean up these old backup files.

Thanks!

I believe this task is best suited using a regular Unix cron job

Tony Chia .