Changeset - 946da6e35339
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-12-23 22:51:22
branko@majic.rs
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.
1 file changed with 2 insertions and 6 deletions:
0 comments (0 inline, 0 general)
roles/database_server/tasks/main.yml
Show inline comments
 
@@ -5,21 +5,17 @@
 
    name:
 
      - mariadb-client
 
      - mariadb-server
 
      - 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';"
 
  register: "root_using_unix_socket_authentication"
 
  changed_when: false
 

	
 
@@ -50,13 +46,13 @@
 

	
 
- name: Remove (now deprecated) my.cnf configuration file for the root database user
 
  file:
 
    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
 
  changed_when: false
 

	
 
- name: Deploy Debian system maintenance configuration file that uses root account
0 comments (0 inline, 0 general)