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