test: Fix EL6 repo

* As EPEL6 has been moved to archive, created `tests/tasks/enable_epel.yml`.
 * As CentOS6 has been moved to vault, created `tests/tests_00_setup.yml`.

Signed-off-by: Gris Ge <fge@redhat.com>
This commit is contained in:
Gris Ge 2020-12-21 22:05:18 +08:00
parent f01655c47a
commit b0f5d6352a
30 changed files with 90 additions and 34 deletions

View file

@ -9,11 +9,6 @@
- rsync
tasks:
- name: Install EPEL for RHEL and CentOS
# yamllint disable-line rule:line-length
command: "yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
when: ansible_distribution in ["CentOS", "RedHat"]
- name: Install rpm dependencies
package:
state: present

View file

@ -0,0 +1,26 @@
# SPDX-License-Identifier: BSD-3-Clause
- name: Fix CentOS6 Base repo
copy:
dest: /etc/yum.repos.d/CentOS-Base.repo
content: |
[base]
name=CentOS-$releasever - Base
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-$releasever - Updates
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-$releasever - Extras
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
when:
- ansible_distribution == 'CentOS'
- ansible_distribution_major_version == '6'
- include_tasks: enable_epel.yml

View file

@ -0,0 +1,24 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Enable EPEL {{ ansible_distribution_major_version }}
# yamllint disable-line rule:line-length
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
args:
warn: false
creates: /etc/yum.repos.d/epel.repo
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version in ['7', '8']
- name: Enable EPEL 6
copy:
dest: /etc/yum.repos.d/epel.repo
content: |
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/$basearch
enabled=1
gpgcheck=0
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version == '6'

View file

@ -1,14 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Install EPEL on enterprise Linux for hostapd
# yamllint disable-line rule:line-length
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
args:
warn: false
creates: /etc/yum.repos.d/epel.repo
when:
- ansible_distribution in ['RedHat', 'CentOS']
- name: Install hostapd
package:
name: hostapd

View file

@ -1,14 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Install EPEL on enterprise Linux for hostapd
# yamllint disable-line rule:line-length
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
args:
warn: false
creates: /etc/yum.repos.d/epel.repo
when:
- ansible_distribution in ['RedHat', 'CentOS']
- name: Install packages required to set up mock wifi network
package:
name:

View file

@ -5,6 +5,7 @@
- hosts: all
name: Run playbook 'playbooks/tests_802_1x.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -5,6 +5,7 @@
- hosts: all
name: Run playbook 'playbooks/tests_802_1x_updated.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -4,6 +4,7 @@
- hosts: all
name: Run playbook 'playbooks/tests_bond.yml' with initscripts as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -5,6 +5,7 @@
- hosts: all
name: Run playbook 'playbooks/tests_bond.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -4,6 +4,7 @@
- hosts: all
name: Run playbook 'playbooks/tests_bridge.yml' with initscripts as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -5,6 +5,7 @@
- hosts: all
name: Run playbook 'playbooks/tests_bridge.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -5,6 +5,7 @@
roles:
- linux-system-roles.network
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Test warning and info logs
assert:
that:

View file

@ -2,6 +2,7 @@
---
- hosts: all
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -2,6 +2,7 @@
---
- hosts: all
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -4,6 +4,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_ethernet.yml' with initscripts as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_ethernet.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -2,6 +2,7 @@
# set network provider and gather facts
- hosts: all
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_ethtool_features.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -3,6 +3,8 @@
- name: Check that creating and removing test devices and assertions work
hosts: all
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: test veth interface management
include_tasks: tasks/create_and_remove_interface.yml
vars:

View file

@ -1,7 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Empty play to gather facts
hosts: all
- hosts: all
tasks:
- include_tasks: tasks/el_repo_setup.yml
- import_playbook: playbooks/integration_pytest_python3.yml
when: (ansible_distribution in ["CentOS", "RedHat"] and

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_provider.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_reapply.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -3,6 +3,8 @@
# set network provider and gather facts
- hosts: all
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -4,6 +4,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_states.yml' with initscripts as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_states.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_team.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -3,15 +3,7 @@
- hosts: all
name: Setup for test running
tasks:
- name: Install EPEL on enterprise Linux for python2-mock
# yamllint disable-line rule:line-length
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
args:
warn: false
creates: /etc/yum.repos.d/epel.repo
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_major_version in ['6', '7']
- include_tasks: tasks/el_repo_setup.yml
- name: Install dependencies
package:

View file

@ -4,6 +4,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_vlan_mtu.yml' with initscripts as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'initscripts'
set_fact:
network_provider: initscripts

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_vlan_mtu.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm

View file

@ -5,6 +5,8 @@
- hosts: all
name: Run playbook 'playbooks/tests_wireless.yml' with nm as provider
tasks:
- include_tasks: tasks/el_repo_setup.yml
- name: Set network provider to 'nm'
set_fact:
network_provider: nm