monit: re-enable tests in RHEL (#11690)

* re-enable monit tests in rhel

* enable EPEL for RHEL<11

* rollback EPEL setup, skip only specific versions

* remove skip entirely

* change download URL in setup_epel, adjusted code to use it

* claude tries to install virtualenv, round 1

* claude tries python3 -m venv instead

* remove outdated centos6 file
This commit is contained in:
Alexei Znamensky
2026-03-31 22:17:38 +13:00
committed by GitHub
parent bc98b2aa3b
commit f4e5fc09d7
6 changed files with 6 additions and 22 deletions

View File

@@ -7,4 +7,3 @@ destructive
needs/target/setup_epel
skip/macos
skip/freebsd
skip/rhel # FIXME

View File

@@ -7,3 +7,4 @@ process_root: /opt/httpd_echo
process_file: "{{ process_root }}/httpd_echo.py"
process_venv: "{{ process_root }}/venv"
process_run_cmd: "{{ process_venv }}/bin/python {{ process_file }}"
virtualenv_command: virtualenv

View File

@@ -9,12 +9,9 @@
# SPDX-License-Identifier: GPL-3.0-or-later
- block:
- name: Install EPEL repository (RHEL only)
- name: Install EPEL repository (only effective in RHEL)
include_role:
name: setup_epel
when:
- ansible_facts.distribution in ['RedHat', 'CentOS']
- ansible_facts.distribution_major_version is version('9', '<')
- name: create required directories
become: true
@@ -67,9 +64,10 @@
pip:
name: "{{ item }}"
virtualenv: "{{ process_venv }}"
virtualenv_command: "{{ virtualenv_command }}"
extra_args: "-c {{ remote_constraints }}"
loop:
- setuptools==44
- setuptools
- python-daemon
- name: restart monit

View File

@@ -1,6 +0,0 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
monitrc: "/etc/monit.conf"

View File

@@ -4,3 +4,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
monitrc: "/etc/monitrc"
virtualenv_command: python3 -m venv

View File

@@ -10,16 +10,7 @@
- name: Install EPEL
yum:
name: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm
disable_gpg_check: true
when:
- ansible_facts.distribution in ['RedHat', 'CentOS']
- ansible_facts.distribution_major_version == '6'
- name: Install EPEL
yum:
name: https://ci-files.testing.ansible.com/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm
disable_gpg_check: true
when:
- ansible_facts.distribution in ['RedHat', 'CentOS']
- ansible_facts.distribution_major_version != '6'