c4d9b9c893
Molecule jobs[0] fails with below error:-
ModuleNotFoundError: No module named 'setuptools_rust'
This error appeared following the release of cryptography 3.4, which
now includes Rust code. It can be installed without Rust using a
Python wheel, but only with more recent pip than version 9.0.3
available as RPM on CentOS 8.
The cryptography bug report [1] recommends pip>=19.1.1.
[0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt
[1] https://github.com/pyca/cryptography/issues/5753
Related-Bug: #1915101
Change-Id: I3650a68640a0ec846be24014ebc6a71110b2f6f7
(cherry picked from commit f8a286cf30
)
123 lines
3.8 KiB
YAML
123 lines
3.8 KiB
YAML
---
|
|
|
|
- hosts: all
|
|
pre_tasks:
|
|
- name: Set project path fact
|
|
set_fact:
|
|
tripleo_ansible_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-ansible'].src_dir }}"
|
|
|
|
- name: Set action plugin path fact
|
|
set_fact:
|
|
tripleo_action_plugins_paths:
|
|
- "{{ tripleo_ansible_project_path }}/tripleo_ansible/roles.galaxy/config_template/action"
|
|
- "{{ tripleo_ansible_project_path }}/tripleo_ansible/ansible_plugins/action"
|
|
- "/usr/share/ansible/plugins/action"
|
|
|
|
- name: Ensure output dirs
|
|
file:
|
|
path: "{{ ansible_user_dir }}/zuul-output/logs"
|
|
state: directory
|
|
|
|
- name: Ensure pip is available
|
|
include_role:
|
|
name: ensure-pip
|
|
|
|
# https://github.com/containers/podman/issues/8965
|
|
# podman rootless systemd is broken in 2.0.5, so we use 1.6.4
|
|
- name: Pin container-tools
|
|
become: true
|
|
shell: |
|
|
dnf module disable container-tools:rhel8 -y
|
|
dnf module enable container-tools:2.0 -y
|
|
when:
|
|
- (ansible_os_family | lower) == "redhat"
|
|
- (ansible_distribution_major_version | int) >= 8
|
|
|
|
- name: Setup bindep
|
|
pip:
|
|
name: "bindep"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
virtualenv_site_packages: true
|
|
|
|
- name: Run bindep
|
|
shell: |-
|
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
|
{{ tripleo_ansible_project_path }}/scripts/bindep-install
|
|
become: true
|
|
|
|
- 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_ansible_project_path }}/molecule-requirements.txt"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
virtualenv_site_packages: true
|
|
extra_args: >-
|
|
--constraint "{{ tripleo_ansible_project_path }}/ansible-requirements.txt"
|
|
|
|
- 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: Copy repos directory to opt workspace
|
|
copy:
|
|
src: /etc/yum.repos.d
|
|
dest: /opt/
|
|
remote_src: true
|
|
mode: "0777"
|
|
|
|
- name: Reset ssh connection
|
|
meta: reset_connection
|
|
tasks:
|
|
- name: Get Ansible Galaxy roles
|
|
command: >-
|
|
{{ ansible_user_dir }}/test-python/bin/ansible-galaxy install
|
|
-fr
|
|
{{ tripleo_ansible_project_path }}/tripleo_ansible/ansible-role-requirements.yml
|
|
environment:
|
|
ANSIBLE_ROLES_PATH: "{{ tripleo_ansible_project_path }}/tripleo_ansible/roles.galaxy"
|