This is an example role I made https://github.com/bcoca/local_backup. this is just ONE way to do it. If using awx/Tower/Controller I would recommend creating a workflow.
-- ---------- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7crLUfm%2BH42OvM%3D723t%2Bvxh2HncbbVcG9wvgiY2tfR_NA%40mail.gmail.com.