mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-23 02:47:37 +00:00
The wireless test setup/cleanup had a lot of duplicated code scattered among a few task files. This unifies the setup and cleanup code and gets rid of redundant files. This also enables all of the wireless tests on CentOS 7 and later, and RHEL 8 and later. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
34 lines
1.4 KiB
YAML
34 lines
1.4 KiB
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
# This file was generated by ensure_provider_tests.py
|
|
---
|
|
# set network provider and gather facts
|
|
# yamllint disable rule:line-length
|
|
- name: Run playbook 'playbooks/tests_wireless.yml' with nm as provider
|
|
hosts: all
|
|
tasks:
|
|
- name: Include the task 'el_repo_setup.yml'
|
|
include_tasks: tasks/el_repo_setup.yml
|
|
- name: Set network provider to 'nm'
|
|
set_fact:
|
|
network_provider: nm
|
|
tags:
|
|
- always
|
|
- name: Include distro variables
|
|
include_vars: vars/rh_distros_vars.yml
|
|
- name: Set platform facts
|
|
set_fact:
|
|
__network_distro_major_version: "{{ ansible_facts['distribution_major_version'] }}"
|
|
__network_is_rhel: "{{ ansible_facts['distribution'] == 'RedHat' }}"
|
|
__network_is_fedora: "{{ ansible_facts['distribution'] == 'Fedora' }}"
|
|
__network_is_centos: "{{ ansible_facts['distribution'] == 'CentOS' }}"
|
|
__network_is_os_family_rhel: "{{ ansible_facts['os_family'] == 'RedHat' }}"
|
|
__is_rh_distro: "{{ __network_is_rh_distro }}"
|
|
|
|
|
|
# The test requires or should run with NetworkManager, therefore it cannot run
|
|
# on RHEL/CentOS 6
|
|
- name: Import the playbook 'playbooks/tests_wireless.yml'
|
|
import_playbook: playbooks/tests_wireless.yml
|
|
when:
|
|
- __network_distro_major_version != '6'
|
|
- not __network_is_rhel or __network_distro_major_version | int > 7
|