ansible-collections/community.mysql

mysql_variables persist and persist_only mode only for MySQL available?

Closed this issue · 2 comments

SUMMARY

mysql_variables with mode persist and persist_only is only available for MySQL and Version >= 8?

Why is this not possible for MariaDB and you exclude it from your tests?
tests/integration/targets/test_mysql_variables/tasks/mysql_variables.yml#L438-L440

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.mysql.mysql_variables

ANSIBLE VERSION
ansible [core 2.16.4]
mariadb  Ver 15.1 Distrib 10.6.17-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
COLLECTION VERSION
community.mysql 3.9.0
STEPS TO REPRODUCE
- name: "<mariadb_config> set custom variables to mariadb config"
  community.mysql.mysql_variables:
    variable: "{{ item.option }}"
    value: "{{ item.value }}"
    mode: persist
    login_user: root
    login_unix_socket: /var/run/mysqld/mysqld.sock
EXPECTED RESULTS
ACTUAL RESULTS
Error Message from ansible: "msg": "Server version must be 8.0 or greater."

Hi @rafi0101, good question.

I found that MariaDB has documented that SET PERSIST is not supported and they are strongly against it: https://jira.mariadb.org/browse/MDEV-16228

Can we close this issue or do you feel we must add a warning or change de documentation?

okay yes then unfortunately it's not possible.

Yes, it might be a good idea to mention that the persist and persist_only function is not available with MariaDB. But we can close this issue