From 946da6e35339bdd29ae1ae64d76d9db3fc19dea7 2020-12-23 22:51:22 From: Branko Majic Date: 2020-12-23 22:51:22 Subject: [PATCH] MAR-168: Minor fixes for the debian_server role: - Drop the workaround for enabling the mysql service (Debian Stretch and upwards use pure systemd unit file). - Improved name of one of the tasks. --- diff --git a/roles/database_server/tasks/main.yml b/roles/database_server/tasks/main.yml index 706f29de184ef79aae6fd4dc0f8947d3abc692bc..937dcbffe4c36c7b6bd46f56768e98d4fb3540cb 100644 --- a/roles/database_server/tasks/main.yml +++ b/roles/database_server/tasks/main.yml @@ -8,15 +8,11 @@ - python3-mysqldb state: present -- name: Enable MariaDB service on boot (workaround for systemctl broken handling of SysV) - command: rcconf -on mysql - register: result - changed_when: not result.stderr - - name: Enable and start MariaDB service: name: mysql state: started + enabled: true - name: Check if root user authentication is based on use of unix_socket module command: mysql --skip-column-names -B -e "select 1 from mysql.user where user='root' and host='localhost' and plugin='unix_socket';" @@ -53,7 +49,7 @@ path: "/root/.my.cnf" state: absent -- name: Check if Debian system maintenance configuration file uses dedicated user +- name: Check if Debian system maintenance configuration file uses the root account command: "grep -q 'user.*=.*root' /etc/mysql/debian.cnf" register: debian_maintenance_configuration_uses_root failed_when: false