Fix #50: adapt pid file default path

Note: by default MDBF packages use a different path than official
distro's packages. IMO the behavior of distro is cleaner, so, make sure
that the directory exist in case we deploy MDBF packages.

Note2: the pid file option does not seem to be mandatory for systemd and
docker, so we might also decide to remove this option by default. But
for the moment it's probably cleaner/simpler to keep default options
deployed with packages.
This commit is contained in:
Faustin Lammler 2025-07-21 09:47:33 +02:00
parent b148d1092d
commit bc18f4c3ad
No known key found for this signature in database
GPG Key ID: 390A2F27832A5C79
2 changed files with 12 additions and 1 deletions

View File

@ -38,6 +38,17 @@
state: present
when: mariadb_use_official_repo
# the following is needed since MDBF packages server installation doesn't
# create the run dir directory which should probably be fixed upstream.
- name: Make sure run dir exist
ansible.builtin.file:
path: /run/mariadb
state: directory
owner: "{{ mariadb_user }}"
group: "{{ mariadb_user }}"
mode: 0755
when: mariadb_use_official_repo
- name: Check if mariadb command exists
ansible.builtin.stat:
path: /usr/bin/mariadb

View File

@ -4,7 +4,7 @@ mariadb_server_package: mariadb-server
mariadb_server_package_mdbf: MariaDB-server
mariadb_config_file: "/etc/my.cnf.d/mariadb-server.cnf"
mariadb_data_dir: "/var/lib/mysql"
mariadb_pid_file: "/run/mysqld.pid"
mariadb_pid_file: "/run/mariadb/mysqld.pid"
mariadb_unix_socket: "/var/lib/mysql/mysql.sock"
mariadb_log_dir: "/var/log/mariadb"
mariadb_log_error_file: "{{ mariadb_log_dir }}/error.log"