
This patch migrates all the molecule jobs for using CentOS-8 Stream instead UBI8 images. Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com> Change-Id: Ied32122e5ec042a141a21c8cc3b43f7e0ef65da8
112 lines
3.3 KiB
YAML
112 lines
3.3 KiB
YAML
---
|
|
- hosts: all
|
|
pre_tasks:
|
|
- name: Set project path fact
|
|
set_fact:
|
|
tripleo_validations_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-validations'].src_dir }}"
|
|
|
|
- name: Ensure output dirs
|
|
file:
|
|
path: "{{ ansible_user_dir }}/zuul-output/logs"
|
|
state: directory
|
|
|
|
- name: Ensure pip is available
|
|
include_role:
|
|
name: ensure-pip
|
|
|
|
- name: Ensure virtualenv is available
|
|
include_role:
|
|
name: ensure-virtualenv
|
|
|
|
- name: Setup bindep
|
|
pip:
|
|
name: "bindep"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
virtualenv_site_packages: true
|
|
|
|
- name: Set containers module to 3.0
|
|
become: true
|
|
shell: |
|
|
dnf module disable container-tools:rhel8 -y
|
|
dnf module enable container-tools:3.0 -y
|
|
dnf clean metadata
|
|
|
|
- name: Run bindep
|
|
shell: |-
|
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
|
{{ tripleo_validations_project_path }}/scripts/bindep-install
|
|
become: true
|
|
changed_when: false
|
|
|
|
- name: Ensure a recent version of pip is installed in virtualenv
|
|
pip:
|
|
name: "pip>=19.1.1"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
|
|
- name: Setup test-python
|
|
pip:
|
|
requirements: "{{ tripleo_validations_project_path }}/molecule-requirements.txt"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
virtualenv_site_packages: true
|
|
|
|
- name: Set up collections
|
|
command: "{{ ansible_user_dir }}/test-python/bin/ansible-galaxy install -fr {{ tripleo_validations_project_path }}/ansible-collections-requirements.yml"
|
|
|
|
- name: Display test-python virtualenv package versions
|
|
shell: |-
|
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
|
pip freeze
|
|
|
|
- name: Basic ci setup
|
|
become: true
|
|
block:
|
|
- name: Ensure ci directories
|
|
file:
|
|
path: "/etc/ci"
|
|
state: "directory"
|
|
|
|
- name: Ensure ci mirror file
|
|
file:
|
|
path: "/etc/ci/mirror_info.sh"
|
|
state: "touch"
|
|
|
|
- name: Set an appropriate fs.file-max
|
|
sysctl:
|
|
name: fs.file-max
|
|
value: 2048000
|
|
sysctl_set: true
|
|
state: present
|
|
reload: true
|
|
|
|
- name: Set container_manage_cgroup boolean
|
|
seboolean:
|
|
name: container_manage_cgroup
|
|
state: true
|
|
persistent: true
|
|
failed_when: false
|
|
|
|
- name: Create limits file for containers
|
|
copy:
|
|
content: |
|
|
* soft nofile 102400
|
|
* hard nofile 204800
|
|
* soft nproc 2048
|
|
* hard nproc 4096
|
|
dest: /etc/security/limits.d/containers.conf
|
|
|
|
- name: Reset ssh connection
|
|
meta: reset_connection
|
|
tasks:
|
|
- name: Get necessary git repos
|
|
git:
|
|
repo: https://opendev.org/openstack/{{ item }}
|
|
dest: "{{ tripleo_validations_project_path }}/roles/roles.galaxy/{{ item }}"
|
|
version: master
|
|
force: true
|
|
with_items:
|
|
- tripleo-ansible
|
|
- validations-common
|