ansible-role-mariadb/tasks/backup.yml

25 lines
736 B
YAML
Raw Normal View History

---
- name: "backup | automysqlbackup - Definiere Postbackup-Skript"
lineinfile:
path: /etc/default/automysqlbackup
regexp: '^#POSTBACKUP='
line: POSTBACKUP="{{ local_scripts_dir }}/automysqlbackup_post_script"
- name: "backup | automysqlbackup - Definiere Backupdir"
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 | Kopiere automysqlbackup-Postscript"
copy:
src: automysqlbackup_post_script
dest: "{{ local_scripts_dir }}/"
mode: 0755