diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a6467e..0ab1c6d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/mysql/tasks/main.yml b/mysql/tasks/main.yml index b99a9aa1..a7c38808 100644 --- a/mysql/tasks/main.yml +++ b/mysql/tasks/main.yml @@ -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" diff --git a/mysql/tasks/users_bullseye.yml b/mysql/tasks/users_bullseye.yml new file mode 100644 index 00000000..1bdc9084 --- /dev/null +++ b/mysql/tasks/users_bullseye.yml @@ -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