Skip to content
Snippets Groups Projects
Commit ced15a1d authored by Simon Michnowicz's avatar Simon Michnowicz
Browse files

added -i keyfile on crontab command

Former-commit-id: 69798b30
parent 34ee6204
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
minute: 55 minute: 55
become: true become: true
become_user: root become_user: root
- name: Create directory {{ SQL_BK_DATA_DIR }} - name: Create directory {{ SQL_BK_DATA_DIR }} to store initial mysql dump
file: path={{ SQL_BK_DATA_DIR }} state=directory file: path={{ SQL_BK_DATA_DIR }} state=directory
become: true become: true
become_user: root become_user: root
...@@ -64,4 +64,4 @@ ...@@ -64,4 +64,4 @@
- name: copy backup script to server ec2-user@{{ SQL_BK_DEST_HOST }} - name: copy backup script to server ec2-user@{{ SQL_BK_DEST_HOST }}
local_action: command scp -i ./slm_db_backup ./delete_old_mysql_bk.sh "ec2-user@{{ SQL_BK_DEST_HOST }}:" local_action: command scp -i ./slm_db_backup ./delete_old_mysql_bk.sh "ec2-user@{{ SQL_BK_DEST_HOST }}:"
- name: insert delete cron job entry on remote server - name: insert delete cron job entry on remote server
local_action: command ssh ec2-user@{{ SQL_BK_DEST_HOST }} "{ crontab -l ; echo '#delete old slurm backups' ; echo '00 23 * * * /home/ec2-user/backup_mysql_for_slurm.sh' ; } | crontab - " local_action: command ssh -i ./slm_db_backup ec2-user@{{ SQL_BK_DEST_HOST }} "{ crontab -l ; echo '#delete old slurm backups' ; echo '00 23 * * * /home/ec2-user/backup_mysql_for_slurm.sh' ; } | crontab - "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment