You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
|
|
|
|
- name: Create directory for backups for mysql database of {{ database_name }}
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ backups_files_directory }}/{{ database_name }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "u=rwx,g=rx,o=rx"
|
|
|
|
|
|
|
|
- name: Install auto backup script for mysql database of {{ database_name }}
|
|
|
|
template:
|
|
|
|
src: "backup.sh"
|
|
|
|
dest: "{{ backup_script }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "u=rwx,g=rx,o=r"
|
|
|
|
|
|
|
|
- name: Configure auto backup mysql database of {{ database_name }}
|
|
|
|
cron:
|
|
|
|
hour: 1
|
|
|
|
minute: 0
|
|
|
|
job: "{{ backup_script }}"
|
|
|
|
name: "backup mysql database of {{ database_name }}"
|
|
|
|
state: present
|