Schedule periodic backup task

Hi everyone,

I need to perform every night a backup of our databases. At the moment, we use Ansible cron module to set up a python script that runs on the remote machine every night. The same operation could be done using an Ansible playbook instead of the python script. I would like to know your opinion about scheduling, with cron module, an Ansible playbook, runned against the local machine.
What do you think about this approach?

I have a bunch of Ansible jobs running from cron. Can’t see any issue with it, and it makes sense to use Ansible if it does what you need. The only time when I’d say it’s not a great idea is if all you’re doing is getting Ansible to run a single shell command.

Although, if you’re pulliing variables from an Ansible inventory, even just running a single shell command could make sense.