geerlingguy / ansible-role-mysql

Ansible Role - MySQL
https://galaxy.ansible.com/geerlingguy/mysql/
MIT License
1.05k stars 866 forks source link

Debian 11 support #457

Closed smallsam closed 2 years ago

smallsam commented 3 years ago

Debian 11/bullseye vars and adding to ci

Fixes #469

SchizoDuckie commented 3 years ago

As far as I can tell, the check in setup-Debian.yml will fail as the default package installs mariadb, which does NOT create a file in /etc/init.d, leading to idempotency errors and deleted innodb logfiles because the role thinks it's always just installed the service.

suggested fix:

#setup-Debian.yml
- name: Check if MySQL is already installed.
  stat: "path=/etc/init.d/{{ mysql_daemon }}"
  register: mysql_installed
#Debian11.yaml
__mysql_daemon: mariadb
domrim commented 2 years ago

can confirm @SchizoDuckie . without these changes the role doesn't run idempotent, with them it does. can sb fix this and get this ready to merge? Debian 11 gets more important every day for us.

smallsam commented 2 years ago

Thanks @SchizoDuckie and @domrim I've incorporated this fix here now.