blob: 95b17a14e80534efa25f74101e41ecee9c21ee82 [file] [log] [blame]
---
# mariadb molecule/default/verify.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Verify
hosts: all
tasks:
- name: Collect MariaDB information
mysql_info:
login_user: root
login_unix_socket: /var/run/mysqld/mysqld.sock
register: mariadb_info
- name: Print MariaDB info
debug:
var: mariadb_info
- name: Verify MariaDB version
assert:
that:
- mariadb_info['version']['major'] == 10
- mariadb_info['version']['minor'] == 5
- name: Check that user can connect to database
community.mysql.mysql_query:
login_db: "exampledb"
query: "show tables;"
login_user: "exampleuser"
login_password: "examplepass"