mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-21 05:21:46 -07:00
This change eliminates the need to install the connector on each controlled node, as `pymysql` version 1.1.1 is now included. As a result, we can safely assume its availability, thus simplifying the testing process. Also, I managed to remove the need for pre-built test containers. We now use the default test containers from ansible-test.
35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
---
|
|
|
|
- name: Query Primary container over TCP for MySQL/MariaDB version
|
|
community.mysql.mysql_info:
|
|
login_user: root
|
|
login_password: msandbox
|
|
login_host: "{{ gateway_addr }}"
|
|
login_port: 3307
|
|
filter:
|
|
- version
|
|
register: primary_info
|
|
failed_when:
|
|
- registred_db_version != db_version
|
|
vars:
|
|
registred_db_version:
|
|
"{{ primary_info.version.major }}.{{ primary_info.version.minor }}\
|
|
.{{ primary_info.version.release }}"
|
|
|
|
- name: Assert that expected Python is installed
|
|
ansible.builtin.command:
|
|
cmd: python{{ python_version }} -V
|
|
changed_when: false
|
|
register: python_in_use
|
|
failed_when:
|
|
- python_in_use.stdout is not search(python_version)
|
|
|
|
- name: Assert that we run the expected ansible version
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_running_version == test_ansible_version
|
|
vars:
|
|
ansible_running_version:
|
|
"{{ ansible_version.major }}.{{ ansible_version.minor }}"
|
|
when:
|
|
- test_ansible_version != 'devel' # Devel will change overtime
|