mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
Rather than having to maintain .yamllint.yml with a list of files exempt from yamllint line-length checking, either fix the code to abide by the line length restriction, or put the yamllint exceptions in-line in the code. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
# This file was generated by ensure_provider_tests.py
|
|
---
|
|
# set network provider and gather facts
|
|
- hosts: all
|
|
# yamllint disable rule:line-length
|
|
name: Run playbook 'playbooks/tests_ethtool_ring.yml' with nm as provider
|
|
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: Install NetworkManager and get NetworkManager version
|
|
when:
|
|
- ansible_distribution_major_version != '6'
|
|
tags:
|
|
- always
|
|
block:
|
|
- name: Install NetworkManager
|
|
package:
|
|
name: NetworkManager
|
|
state: present
|
|
- name: Get NetworkManager package info
|
|
yum:
|
|
list: NetworkManager
|
|
register: networkmanager_info
|
|
- name: Get NetworkManager version
|
|
set_fact:
|
|
networkmanager_version: "{{ networkmanager_info.results |
|
|
selectattr('yumstate', 'match', '^installed$') |
|
|
map(attribute='version') | list | first }}"
|
|
when: true
|
|
changed_when: false
|
|
|
|
|
|
# The test requires or should run with NetworkManager, therefore it cannot run
|
|
# on RHEL/CentOS 6
|
|
# NetworkManager 1.25.2 introduced ethtool ring support
|
|
- name: Import the playbook 'playbooks/tests_ethtool_ring.yml'
|
|
import_playbook: playbooks/tests_ethtool_ring.yml
|
|
when:
|
|
- ansible_distribution_major_version != '6'
|
|
|
|
- networkmanager_version is version('1.25.2', '>=')
|