refs #8414 - Minnor changes

This commit is contained in:
Xavi Lleó 2025-02-04 14:45:18 +01:00
parent 9472b212ce
commit d802f4e367
4 changed files with 6 additions and 3 deletions

5
playbooks/db.yml Normal file
View File

@ -0,0 +1,5 @@
- name: Configure DB
hosts: all
tasks:
- import_role:
name: db

View File

@ -1,4 +1,3 @@
realm: "{{domain}}.{{host_domain}}"
mariadb_base_packages:
- mariadb-server
- mariadb-backup
@ -19,7 +18,6 @@ required_directories:
- { path: /root/mariabackup, owner: root, group: root, mode: 'u=rwx,g=rx,o=rx' }
- { path: /mnt/mysqldata/mysql, owner: mysql, group: mysql, mode: 'u=rwx,g=rx,o=rx' }
- { path: /etc/systemd/system/mariadb.service.d, owner: root, group: root, mode: 'u=rwx,g=rx,o=rx' }
required_files_and_mariabackup_files_and_root_scripts:
- { src: "mariadb_override.conf", dest: "/etc/systemd/system/mariadb.service.d/override.conf", mode: "u=rw,g=r,o=r" }
- { src: "mysql-flush.sh", dest: "/etc/qemu/fsfreeze-hook.d/mysql-flush.sh", mode: "u=rwx,g=rx,o=rx" }

View File

@ -44,6 +44,7 @@ mariabackup \
--target-dir="$restoreDir" \
2>> "$logFile"
chown -R mysql:mysql "$dataDir"
chmod 755 "$dataDir"
rm "$dataDir/mysql/slow_log."*
rm "$dataDir/mysql/general_log."*

View File

@ -1,2 +1 @@
- import_tasks: mariadb.yml
tags: mariadb