Hi @Andersson007 and all,
First of all: I understand the motivation, and thanks for all the work you’ve put into this collection. Anyone who has looked at the engine × version test matrix or the conditional branches in the code can see why a split looks attractive. I don’t want to downplay that pain.
Still, I’d like to ask you to reconsider the plan, or at least narrow it. From the user side it moves a lot of that complexity onto people who never chose to deal with it.
The biggest issue: a large share of “MySQL” users are running MariaDB without ever having chosen it.
Debian is the clearest example. Debian 13 (trixie) doesn’t ship a mysql-server package at all. default-mysql-server, the package you get when you “install MySQL” on Debian, depends on mariadb-server-compat. The mysql command, the mysql.service unit and the /etc/mysql paths are all MariaDB underneath.
The same goes for the Ansible ecosystem. geerlingguy.mysql, one of the most widely used MySQL roles on Galaxy, installs default-mysql-server on Debian 12 and 13, which means MariaDB. It manages databases and users with plain mysql_db: and mysql_user: tasks, which resolve to this collection. Everyone who uses that role on current Debian is a MariaDB user of ansible.mysql today, whether they know it or not.
For these users the split means:
- a deprecation warning on runs where nothing changed on their side, about an engine they believe they don’t use;
- a hard break the day
ansible.mysql6.0.0 reaches the Ansible package, often inside roles they didn’t write and can’t easily change; - and the fix isn’t “change one FQCN”. They first have to find out which engine they’re actually running, on every host, and then branch on it.
@noonedeadpunk raised exactly this (“as an operator you usually don’t know what you’re dealing with as a backend”), and gotmax23 called it a very good point, but it hasn’t been answered yet. In my view it’s the most important argument in this thread.
Some context on where we stand: we run a hosting platform that deploys and manages several hundred MySQL (Percona) database servers with Ansible. We’re now adding MariaDB next to it, including migrating customers between the two engines in both directions.
Three more points:
-
Ansible can’t template a module name. A role that supports both engines can’t write
"{{ engine }}_user":. Every task that creates a database or a user needs two copies, or a per-engine include file that exists only to switch the FQCN. That is permanent duplication in every role that supports both engines, not a one-time rename. -
Most of the code really is shared. Connection handling,
mysql_db,mysql_query,mysql_info,mysql_variablesand the basics ofmysql_userbehave the same on both engines. The clone only had to drop three modules, which says a lot. After the split, every fix in that shared part has to be found and backported by hand between two collections, indefinitely. That’s the “double the work, maintainers spread thinner” cost felixfontein and bvitnik warned about. Forks drift, and users end up with a fix in one collection but not the other. -
The differences are real, but contained. Replication, roles and auth plugins differ, and the collection already handles that in
implementations/mysqlandimplementations/mariadb. Splitting doesn’t remove those differences. It moves the branching out of one codebase and into every playbook and role that touches a database.
Alternatives that would ease the maintenance pain without hitting these users:
- Keep one collection and shrink the test matrix instead, e.g. test MariaDB only on its current LTS releases (11.8 and 12.3).
- If the split stays: keep the engine-neutral modules (
mysql_db,mysql_user,mysql_query,mysql_info,mysql_variables) supporting MariaDB inansible.mysqlwithout a removal date, and move only the parts that really diverge (replication, roles) toansible.mariadb. Or share one commonmodule_utils, so a fix lands once. - Add the engine-detection / engine-agnostic entry point noonedeadpunk suggested, so roles don’t have to branch on every task.
- At minimum, hold back the warning until the removal is actually close. Then contact the authors of the most-used roles that install MariaDB through distro defaults, before anything breaks.
I realise the vote is done and the work has started, so I don’t say this lightly. I just think the split looks cheaper from inside the collection than it will be for the many people who don’t even know they’re on MariaDB.
Thanks for considering it.