ansible-role-mariadb/tasks/backup.yml

25 lines
773 B
YAML
Raw Normal View History

---
- name: "Backup | Set automysqlbackup postbackup script"
ansible.builtin.lineinfile:
path: /etc/default/automysqlbackup
regexp: '^#POSTBACKUP='
line: POSTBACKUP="{{ local_scripts_dir }}/automysqlbackup_post_script"
- name: "Backup | Dest automysqlbackup backupdir"
ansible.builtin.lineinfile:
path: /etc/default/automysqlbackup
regexp: '^BACKUPDIR='
line: 'BACKUPDIR="{{ automysqlbackup_backupdir|default("/var/lib/automysqlbackup") }}"'
- name: "backup | Prüfe scripts-Verzeichnis"
file:
path: "{{ local_scripts_dir }}"
state: touch
changed_when: false
- name: "Backup | Copy automysqlbackup postbackup script"
ansible.builtin.copy:
src: automysqlbackup_post_script
dest: "{{ local_scripts_dir }}/"
mode: 0755