Hello,
In my deployments, I tend to do db backups and dump them into filenames containing a timestamp like so:
mysqldump dbname | gzip -9c > ~/dbname.
date +%Y-%m-%d.%H%M.sql.gz ; ls -la ~/ | grep
date +%Y-%m-%d`
`
As you can see, when the dump is done, I want to see the resulting file just to eyeball it and make everything looks right.
(To answer future questions: we date time stamp our backup files so that we can keep them for an extended period of time.)
I would like to write something like this:
`
-
hosts: dbserver
remote_user: jlouthan
tasks: -
name: Backup Prod Database
shell: mysqldump dbdump | gzip -9c > ~jlouthan/dbdump.date +%Y-%m-%d
.sql.gz
become: yes
become_method: sudo -
name: Check to see if the dbdump has been successfully created
wait_for: path=~jlouthan/dbdump.date +%Y-%m-%d
.sql.gz
`
Is there any chance that Ansible would be able to pick up on backticks or is there a better way?