Fix: test_mysql_role : Check in DB assertion

This commit is contained in:
R. Sicart 2021-11-30 18:35:15 +01:00
commit 5e4f3653ed

View file

@ -147,11 +147,26 @@
mysql_query:
<<: *mysql_params
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}' AND Host = '%'"
when: install_type == 'mysql'
- name: Check
assert:
that:
- result.rowcount.0 == 1
when: install_type == 'mysql'
- name: Check in DB (mariadb)
<<: *task_params
mysql_query:
<<: *mysql_params
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}' AND Host = ''"
when: install_type == 'mariadb'
- name: Check (mariadb)
assert:
that:
- result.rowcount.0 == 1
when: install_type == 'mariadb'
- name: Check in DB, if not granted, the query will fail
<<: *task_params