Fix: test_mysql_role : Check in DB, if not granted, the query will fail for mariadb

This commit is contained in:
R. Sicart 2021-11-30 19:03:22 +01:00
commit e864d510a1

View file

@ -173,6 +173,14 @@
mysql_query:
<<: *mysql_params
query: "SHOW GRANTS FOR {{ user0 }}@localhost USING '{{ role0 }}'"
when: install_type == 'mysql'
- name: Check in DB, if not granted, the query will fail (mariadb)
<<: *task_params
mysql_query:
<<: *mysql_params
query: "SELECT 1 FROM mysql.roles_mapping WHERE User = '{{ role0 }}' AND Host = 'localhost' AND Role = '{{ role0 }}'"
when: install_type == 'mariadb'
- name: Check
assert: