mysql : Create a default ~root/.my.cnf for compatibility reasons

This commit is contained in:
Ludovic Poujol 2021-10-20 16:31:05 +02:00
parent b120a92203
commit 9b3bb39bd0
3 changed files with 19 additions and 3 deletions

View File

@ -23,6 +23,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Fixed
* mysql : Create a default ~root/.my.cnf for compatibility reasons
* nginx : fix variable name and debug to actually use nginx-light
* packweb-apache : Support php 8.0

View File

@ -10,9 +10,9 @@
- include: packages_jessie.yml
when: ansible_distribution_release == "jessie"
## There is nothing to do with users on Debian 11
# - include: users_bullseye.yml
# when: ansible_distribution_release == "bullseye"
## There is nothing to do with users on Debian 11 - yet we need a /root/.my.cnf for compatibility
- include: users_bullseye.yml
when: ansible_distribution_release == "bullseye"
- include: users_buster.yml
when: ansible_distribution_release == "buster"

View File

@ -0,0 +1,15 @@
---
- name: Populate the .my.cnf of root with default user
ini_file:
dest: /root/.my.cnf
mode: "0600"
section: client
option: '{{ item.option }}'
value: '{{ item.value }}'
create: yes
loop:
- { option: 'user', value: 'root' }
- { option: 'socket', value: '/run/mysqld/mysqld.sock' }
tags:
- mysql