mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
This is mainly needed on el7 - NetworkManager is installed by default, or somewhere else, on el8 and later. Additionally, if the NetworkManager-server-config package is installed, then the secondary interface will not be active, so ensure it is active. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
45 lines
1.5 KiB
YAML
45 lines
1.5 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_mac_address_match.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: Install NetworkManager and get NetworkManager version
|
|
when:
|
|
- ansible_distribution_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
|
|
# needs any old version of NM
|
|
- name: Import the playbook 'playbooks/tests_mac_address_match.yml'
|
|
import_playbook: playbooks/tests_mac_address_match.yml
|
|
when:
|
|
- ansible_distribution_major_version != '6'
|
|
|
|
- networkmanager_version is version('1.18.0', '>=')
|