Schedule periodic backup task

19 views
Skip to first unread message

Mitiryl

unread,
Jun 1, 2017, 12:14:33 PM6/1/17
to Ansible Project
 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?

Paul Markham

unread,
Jun 1, 2017, 8:33:01 PM6/1/17
to Ansible Project
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.

Paul Markham

unread,
Jun 1, 2017, 8:35:23 PM6/1/17
to Ansible Project
Although, if you're pulliing variables from an Ansible inventory, even just running a single shell command could make sense.
Reply all
Reply to author
Forward
0 new messages