[CI] Remove ansible-test custom containers (#650)

* Cut tests containers

* Cut unused flatten versions

* Fix installation of mysqlclient on Ubuntu

* Cut unused variables

* Fix package missing on Unbuntu 22.04

* Fix variable templating

* Fix test for ansible 2.17 and do remove the ignore_errors

ignore_errors is bad because it makes searching for real errors
difficult.
This commit is contained in:
Laurent Indermühle 2024-06-24 09:36:32 +02:00 committed by GitHub
commit 1922e7154e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 55 additions and 743 deletions

View file

@ -4,15 +4,18 @@
# and should not be used as examples of how to write Ansible roles #
####################################################################
- name: Prepare the fake root folder
- name: "{{ role_name }} | Main | Prepare the fake root folder"
ansible.builtin.import_tasks:
file: fake_root.yml
# setvars.yml requires the iproute2 package installed by install.yml
- name: Set variables
- name: "{{ role_name }} | Main | Set variables"
ansible.builtin.import_tasks:
file: setvars.yml
- name: Verify all components version under test
- name: "{{ role_name }} | Main | Install requirements"
ansible.builtin.import_tasks:
file: requirements.yml
- name: "{{ role_name }} | Main | Verify all components version under test"
ansible.builtin.import_tasks:
file: verify.yml

View file

@ -0,0 +1,20 @@
---
- name: "{{ role_name }} | Requirements | Install Linux packages"
ansible.builtin.package:
name:
- bzip2 # To test mysql_db dump compression
- "{{ db_engine }}-client"
# The command mysql-config must be present for mysqlclient python package.
# The package libmysqlclient-dev that provides this command have a
# different name between Ubuntu 20.04 and 22.04. Luckily, libmysql++ is
# available on both.
- "{{ 'libmysql++-dev' if db_engine == 'mysql' else 'libmariadb-dev' }}"
state: present
- name: "{{ role_name }} | Requirements | Install Python packages"
ansible.builtin.pip:
name:
- "{{ connector_name }}=={{ connector_version }}"
state: present

View file

@ -1,13 +1,17 @@
---
- name: "{{ role_name }} | Setvars | Extract Podman/Docker Network Gateway"
ansible.builtin.shell:
cmd: ip route|grep default|awk '{print $3}'
register: ip_route_output
- name: "{{ role_name }} | Setvars | Install tools gather network facts"
ansible.builtin.package:
name:
- iproute2
state: present
- name: "{{ role_name }} | Setvars | Gather facts"
ansible.builtin.setup:
- name: "{{ role_name }} | Setvars | Set Fact"
ansible.builtin.set_fact:
gateway_addr: "{{ ip_route_output.stdout }}"
gateway_addr: "{{ ansible_default_ipv4.gateway }}"
connector_name_lookup: >-
{{ lookup(
'file',