community.mysql/tests/integration/targets/setup_controller/tasks/verify.yml
Laurent Indermuehle 04af62c400
Embed pymysql within the collection and use default test container
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.
2024-06-07 14:05:40 +02:00

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