-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathtests_ethtool_features_nm.yml
More file actions
54 lines (51 loc) · 2.07 KB
/
Copy pathtests_ethtool_features_nm.yml
File metadata and controls
54 lines (51 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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_ethtool_features.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 }}"
- name: Install NetworkManager and get NetworkManager version
when:
- __network_distro_major_version != '6'
tags:
- always
block:
- name: Install NetworkManager
package:
name: NetworkManager
state: present
use: "{{ (__network_is_ostree | d(false)) |
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
- name: Get package info
package_facts:
- name: Get NetworkManager version
set_fact:
networkmanager_version: "{{
ansible_facts.packages['NetworkManager'][0]['version'] }}"
# The test requires or should run with NetworkManager, therefore it cannot run
# on RHEL/CentOS 6
# NetworkManager 1.20.0 introduced ethtool settings support
- name: Import the playbook 'playbooks/tests_ethtool_features.yml'
import_playbook: playbooks/tests_ethtool_features.yml
when:
- __network_distro_major_version != '6'
- networkmanager_version is version('1.20.0', '>=')