mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
ansible-lint: Fix name[missing] and name[play] failures
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
This commit is contained in:
parent
aa3b6bd8dc
commit
5ff1189409
118 changed files with 847 additions and 431 deletions
|
|
@ -11,7 +11,8 @@ import sys
|
|||
|
||||
|
||||
GET_NM_VERSION = """
|
||||
- when:
|
||||
- name: Install NetworkManager and get NetworkManager version
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
tags:
|
||||
- always
|
||||
|
|
@ -46,7 +47,8 @@ RUN_PLAYBOOK_WITH_NM = """# SPDX-License-Identifier: BSD-3-Clause
|
|||
- hosts: all
|
||||
name: Run playbook '{test_playbook}' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -56,7 +58,8 @@ RUN_PLAYBOOK_WITH_NM = """# SPDX-License-Identifier: BSD-3-Clause
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
{comment}- import_playbook: {test_playbook}
|
||||
{comment}- name: Import the playbook '{test_playbook}'
|
||||
import_playbook: {test_playbook}
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
{minimum_nm_version_check}{extra_run_condition}"""
|
||||
|
|
@ -150,14 +153,16 @@ RUN_PLAYBOOK_WITH_INITSCRIPTS = """# SPDX-License-Identifier: BSD-3-Clause
|
|||
- hosts: all
|
||||
name: Run playbook '{test_playbook}' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: {test_playbook}
|
||||
- name: Import the playbook '{test_playbook}'
|
||||
import_playbook: {test_playbook}
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and\n \
|
||||
ansible_distribution_major_version | int < 9)
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@
|
|||
name: coverage
|
||||
extra_args: --user --upgrade
|
||||
|
||||
- import_playbook: "{{ test_playbook }}"
|
||||
- name: Import the playbook '{{ test_playbook }}'
|
||||
import_playbook: "{{ test_playbook }}"
|
||||
vars:
|
||||
ansible_python_interpreter:
|
||||
# yamllint disable-line rule:line-length
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- import_playbook: down_profile.yml
|
||||
- name: Import the playbook 'down_profile.yml'
|
||||
import_playbook: down_profile.yml
|
||||
- name: Delete the interface
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/delete_interface.yml
|
||||
- name: Include the task 'delete_interface.yml'
|
||||
include_tasks: tasks/delete_interface.yml
|
||||
|
|
|
|||
|
|
@ -21,17 +21,20 @@
|
|||
|
||||
# Import needed in order to install initscripts dependencies on the remote
|
||||
# system.
|
||||
- import_playbook: "../tests_default_initscripts.yml"
|
||||
- name: Import the playbook '../tests_default_initscripts.yml'
|
||||
import_playbook: "../tests_default_initscripts.yml"
|
||||
|
||||
# Import needed in order to install Network Manager dependencies on the remote
|
||||
# system.
|
||||
- import_playbook: "../tests_default_nm.yml"
|
||||
- name: Import the playbook '../tests_default_nm.yml'
|
||||
import_playbook: "../tests_default_nm.yml"
|
||||
|
||||
|
||||
- name: Run Pytest tests
|
||||
hosts: all
|
||||
tasks:
|
||||
- block:
|
||||
- name: Run Pytest tests
|
||||
block:
|
||||
- name: Create tempdir for code to test
|
||||
tempfile:
|
||||
state: directory
|
||||
|
|
@ -45,7 +48,8 @@
|
|||
register: temptar
|
||||
delegate_to: localhost
|
||||
|
||||
- include_tasks: ../tasks/get_modules_and_utils_paths.yml
|
||||
- name: Include the task '../tasks/get_modules_and_utils_paths.yml'
|
||||
include_tasks: ../tasks/get_modules_and_utils_paths.yml
|
||||
|
||||
- name: Get tests directory
|
||||
set_fact:
|
||||
|
|
@ -125,7 +129,8 @@
|
|||
command: ls -alrtFR {{ _rundir.path }}
|
||||
changed_when: false
|
||||
|
||||
- block:
|
||||
- name: Run pytest with nm provider
|
||||
block:
|
||||
- name: Run pytest with nm
|
||||
command: >
|
||||
pytest
|
||||
|
|
@ -136,10 +141,12 @@
|
|||
PYTHONPATH: "{{ _lsr_python_path }}"
|
||||
changed_when: false
|
||||
always:
|
||||
- debug:
|
||||
- name: Debug stdout_lines of the running playbook with nm
|
||||
debug:
|
||||
var: playbook_run.stdout_lines
|
||||
|
||||
- block:
|
||||
- name: Run pytest with initscripts provider
|
||||
block:
|
||||
- name: Install network-scripts when running pytest with initscripts
|
||||
package:
|
||||
name: network-scripts
|
||||
|
|
@ -154,7 +161,8 @@
|
|||
PYTHONPATH: "{{ _lsr_python_path }}"
|
||||
changed_when: false
|
||||
always:
|
||||
- debug:
|
||||
- name: Debug stdout_lines of the running playbook with initscripts
|
||||
debug:
|
||||
var: playbook_run.stdout_lines
|
||||
always:
|
||||
- name: Remove local tar file
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing ethtool coalesce settings
|
||||
hosts: all
|
||||
vars:
|
||||
interface: "{{ network_interface_name1 }}"
|
||||
type: "{{ network_interface_type1 }}"
|
||||
|
|
@ -8,16 +9,20 @@
|
|||
- name: "INIT: Ethtool coalesce tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Install ethtool (test dependency)
|
||||
package:
|
||||
name: ethtool
|
||||
state: present
|
||||
- block:
|
||||
- name: Test ethtool coalesce settings
|
||||
block:
|
||||
- name: >-
|
||||
TEST: I can create a profile without changing the ethtool coalesce.
|
||||
debug:
|
||||
|
|
@ -106,10 +111,12 @@
|
|||
when:
|
||||
network_provider == 'nm'
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- import_role:
|
||||
- name: Deactivate the connection and remove the connection profile
|
||||
import_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
|
|
@ -117,6 +124,7 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@
|
|||
- name: Run the tasklist {{ task }}
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: "{{ task }}"
|
||||
- name: Include the task '{{ task }}'
|
||||
include_tasks: "{{ task }}"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing configuring 802.1x authentication
|
||||
hosts: all
|
||||
vars:
|
||||
interface: 802-1x-test
|
||||
tasks:
|
||||
- name: "INIT: 802.1x tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/setup_802.1x.yml
|
||||
- block:
|
||||
- name: Include the task 'setup_802.1x.yml'
|
||||
include_tasks: tasks/setup_802.1x.yml
|
||||
- name: Test configuring 802.1x authentication
|
||||
block:
|
||||
- name: "TEST: 802.1x profile with private key password and ca cert"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -94,12 +97,15 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
|
||||
- include_tasks: tasks/test_802.1x_capath.yml
|
||||
- name: Include the task 'test_802.1x_capath.yml'
|
||||
include_tasks: tasks/test_802.1x_capath.yml
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- import_role:
|
||||
- name: Deactivate the connection and remove the connection profile
|
||||
import_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
|
|
@ -110,7 +116,8 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- include_tasks: tasks/cleanup_802_1x_server.yml
|
||||
- name: Include the task 'cleanup_802_1x_server.yml'
|
||||
include_tasks: tasks/cleanup_802_1x_server.yml
|
||||
- name: Remove test certificates
|
||||
file:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing configuring 802.1x authentication with latest
|
||||
NetworkManager
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Update NetworkManager
|
||||
package:
|
||||
|
|
@ -10,4 +12,5 @@
|
|||
service:
|
||||
name: NetworkManager
|
||||
state: restarted
|
||||
- import_playbook: tests_802_1x.yml
|
||||
- name: Import the playbook 'tests_802_1x.yml'
|
||||
import_playbook: tests_802_1x.yml
|
||||
|
|
|
|||
|
|
@ -1,15 +1,19 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing auto_gateway setting
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
interface: veth0
|
||||
tasks:
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: >-
|
||||
TEST: I can configure an interface with auto_gateway enabled
|
||||
debug:
|
||||
|
|
@ -35,8 +39,10 @@
|
|||
# not take precedence over other routes or not ignore other
|
||||
# routes
|
||||
route_metric4: 65535
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: "Show ipv4 routes"
|
||||
|
|
@ -72,14 +78,16 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- name: >-
|
||||
TEST: I can configure an interface with auto_gateway disabled
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- name: Import network role
|
||||
|
|
@ -99,8 +107,10 @@
|
|||
- "203.0.113.2/24"
|
||||
gateway6: "2001:db8::1"
|
||||
gateway4: "203.0.113.1"
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: "Show ipv4 routes"
|
||||
|
|
@ -136,6 +146,7 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing bond connection
|
||||
hosts: all
|
||||
tags:
|
||||
- tests::expfail
|
||||
vars:
|
||||
|
|
@ -14,11 +15,14 @@
|
|||
- name: "INIT Prepare setup"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'create_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface1 }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface2 }}"
|
||||
- name: "Backup the /etc/resolv.conf for initscript"
|
||||
|
|
@ -26,7 +30,8 @@
|
|||
when:
|
||||
- network_provider == "initscripts"
|
||||
changed_when: false
|
||||
- block:
|
||||
- name: Test bond device
|
||||
block:
|
||||
- name: "TEST Add Bond with 2 ports"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -57,10 +62,12 @@
|
|||
type: ethernet
|
||||
interface_name: "{{ dhcp_interface2 }}"
|
||||
controller: "{{ controller_profile }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ controller_device }}"
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ item }}"
|
||||
loop:
|
||||
|
|
@ -88,7 +95,8 @@
|
|||
delay: 2
|
||||
changed_when: false
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test devices and the connection profiles
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -106,10 +114,12 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- command: ip link del {{ controller_device }}
|
||||
- name: Delete the device '{{ controller_device }}'
|
||||
command: ip link del {{ controller_device }}
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
- import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'remove_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: "Restore the /etc/resolv.conf for initscript"
|
||||
command: mv -vf /etc/resolv.conf.bak /etc/resolv.conf
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing bond cloned MAC address
|
||||
hosts: all
|
||||
tags:
|
||||
- tests::expfail
|
||||
vars:
|
||||
|
|
@ -14,13 +15,15 @@
|
|||
- name: INIT Prepare setup
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'create_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- name: Backup the /etc/resolv.conf for initscript
|
||||
command: cp -vf /etc/resolv.conf /etc/resolv.conf.bak
|
||||
when:
|
||||
- network_provider == "initscripts"
|
||||
changed_when: false
|
||||
- block:
|
||||
- name: Test bond cloned MAC address
|
||||
block:
|
||||
- name: TEST Add Bond with 2 ports
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -104,7 +107,8 @@
|
|||
when: network_provider == 'initscripts'
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test devices and the connection profiles
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -122,10 +126,12 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- command: ip link del {{ controller_device }}
|
||||
- name: Delete the device '{{ controller_device }}'
|
||||
command: ip link del {{ controller_device }}
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
- import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'remove_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: Restore the /etc/resolv.conf for initscript
|
||||
command: mv -vf /etc/resolv.conf.bak /etc/resolv.conf
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing bond device using deprecated 'master' argument
|
||||
hosts: all
|
||||
tags:
|
||||
- tests::expfail
|
||||
vars:
|
||||
|
|
@ -14,14 +15,18 @@
|
|||
- name: "INIT Prepare setup"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'create_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface1 }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface2 }}"
|
||||
- block:
|
||||
- name: Test bond device using deprecated 'master' argument
|
||||
block:
|
||||
- name: "TEST Add Bond with 2 ports using deprecated 'master' argument"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -52,10 +57,12 @@
|
|||
type: ethernet
|
||||
interface_name: "{{ dhcp_interface2 }}"
|
||||
master: "{{ controller_profile }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ controller_device }}"
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ item }}"
|
||||
loop:
|
||||
|
|
@ -83,7 +90,8 @@
|
|||
delay: 2
|
||||
changed_when: false
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test devices and the connection profiles
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -101,7 +109,9 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- command: ip link del {{ controller_device }}
|
||||
- name: Delete the device '{{ controller_device }}'
|
||||
command: ip link del {{ controller_device }}
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
- import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'remove_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing bond options
|
||||
hosts: all
|
||||
tags:
|
||||
- tests::expfail
|
||||
vars:
|
||||
|
|
@ -14,14 +15,18 @@
|
|||
- name: "INIT Prepare setup"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'create_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface1 }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface2 }}"
|
||||
- block:
|
||||
- name: Test bond options
|
||||
block:
|
||||
- name: "TEST Add Bond with 2 ports"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -68,10 +73,12 @@
|
|||
type: ethernet
|
||||
interface_name: "{{ dhcp_interface2 }}"
|
||||
controller: "{{ controller_profile }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ controller_device }}"
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ item }}"
|
||||
loop:
|
||||
|
|
@ -177,7 +184,8 @@
|
|||
changed_when: false
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test devices and the connection profiles
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -195,7 +203,9 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- command: ip link del {{ controller_device }}
|
||||
- name: Delete the device '{{ controller_device }}'
|
||||
command: ip link del {{ controller_device }}
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
- import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'remove_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing bond removal
|
||||
hosts: all
|
||||
tags:
|
||||
- tests::expfail
|
||||
vars:
|
||||
|
|
@ -14,11 +15,14 @@
|
|||
- name: "INIT Prepare setup"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'create_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/create_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface1 }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ dhcp_interface2 }}"
|
||||
- name: "Backup the /etc/resolv.conf for initscript"
|
||||
|
|
@ -26,7 +30,8 @@
|
|||
when:
|
||||
- network_provider == "initscripts"
|
||||
changed_when: false
|
||||
- block:
|
||||
- name: Test removing bond device
|
||||
block:
|
||||
- name: "TEST Add Bond with 2 ports"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -57,10 +62,12 @@
|
|||
type: ethernet
|
||||
interface_name: "{{ dhcp_interface2 }}"
|
||||
controller: "{{ controller_profile }}"
|
||||
- import_tasks: tasks/assert_device_present.yml
|
||||
- name: Import the task 'assert_device_present.yml'
|
||||
import_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ controller_device }}"
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ item }}"
|
||||
loop:
|
||||
|
|
@ -228,7 +235,8 @@
|
|||
when: network_provider == "initscripts"
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -240,10 +248,12 @@
|
|||
state: down
|
||||
persistent_state: absent
|
||||
failed_when: false
|
||||
- command: ip link del {{ controller_device }}
|
||||
- name: Delete the device '{{ controller_device }}'
|
||||
command: ip link del {{ controller_device }}
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
- import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: Import the task 'remove_test_interfaces_with_dhcp.yml'
|
||||
import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
- name: "Restore the /etc/resolv.conf for initscript"
|
||||
command: mv -vf /etc/resolv.conf.bak /etc/resolv.conf
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@
|
|||
- name: "Set interface={{ interface }}"
|
||||
set_fact:
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
|
||||
- name: Add test bridge
|
||||
hosts: all
|
||||
|
|
@ -26,29 +28,35 @@
|
|||
roles:
|
||||
- linux-system-roles.network
|
||||
|
||||
- import_playbook: run_tasks.yml
|
||||
- name: Import the playbook 'run_tasks.yml'
|
||||
import_playbook: run_tasks.yml
|
||||
vars:
|
||||
task: tasks/assert_device_present.yml
|
||||
|
||||
- import_playbook: run_tasks.yml
|
||||
- name: Import the playbook 'run_tasks.yml'
|
||||
import_playbook: run_tasks.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
task: tasks/assert_profile_present.yml
|
||||
|
||||
- import_playbook: down_profile+delete_interface.yml
|
||||
- name: Import the playbook 'down_profile+delete_interface.yml'
|
||||
import_playbook: down_profile+delete_interface.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
|
||||
- import_playbook: run_tasks.yml
|
||||
- name: Import the playbook 'run_tasks.yml'
|
||||
import_playbook: run_tasks.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
task: tasks/assert_profile_absent.yml
|
||||
|
||||
- import_playbook: run_tasks.yml
|
||||
- name: Import the playbook 'run_tasks.yml'
|
||||
import_playbook: run_tasks.yml
|
||||
vars:
|
||||
task: tasks/assert_device_absent.yml
|
||||
|
|
|
|||
|
|
@ -51,10 +51,12 @@
|
|||
cloned_mac_address_nm.stdout.find(cloned_mac) != -1
|
||||
msg: "cloned-mac-address is configured incorrectly"
|
||||
|
||||
- import_playbook: down_profile+delete_interface.yml
|
||||
- name: Import the playbook 'down_profile+delete_interface.yml'
|
||||
import_playbook: down_profile+delete_interface.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
# mark a device as unmanaged for NM and then tries to activiate it using NM.
|
||||
# This failed without removing the checkpoint.
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing checkpoint cleanup
|
||||
hosts: all
|
||||
vars:
|
||||
interface: cptstbr
|
||||
profile: "{{ interface }}"
|
||||
|
|
@ -13,12 +14,15 @@
|
|||
- name: Show test banner
|
||||
debug:
|
||||
msg: Inside states tests
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test checkpoint cleanup
|
||||
block:
|
||||
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1832897
|
||||
- name: Install dbus-tools
|
||||
package:
|
||||
|
|
@ -37,8 +41,10 @@
|
|||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
# Use internal module directly for speedup
|
||||
- name: Use network_connections
|
||||
network_connections:
|
||||
|
|
@ -73,19 +79,23 @@
|
|||
'/org/freedesktop/NetworkManager/Checkpoint/' not in
|
||||
nm_dbus_objects.stdout_lines
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
block:
|
||||
# Use internal module directly for speedup
|
||||
- network_connections:
|
||||
- name: Deactivate the connection and remove the connection profile
|
||||
network_connections:
|
||||
provider: nm
|
||||
connections:
|
||||
- name: "{{ interface }}"
|
||||
persistent_state: absent
|
||||
state: down
|
||||
- file:
|
||||
- name: Remove the connection profile
|
||||
file:
|
||||
dest: "/etc/sysconfig/network-scripts/ifcfg-{{ interface }}"
|
||||
state: absent
|
||||
- command: ip link del "{{ interface }}"
|
||||
- name: Delete the device '{{ interface }}'
|
||||
command: ip link del "{{ interface }}"
|
||||
changed_when: false
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing dummy connection
|
||||
hosts: all
|
||||
vars:
|
||||
interface: dummy0
|
||||
profile: "{{ interface }}"
|
||||
|
|
@ -13,10 +14,12 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- tags:
|
||||
- name: Test the dummy connection
|
||||
tags:
|
||||
- tests::dummy:create
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: Create a dummy interface
|
||||
lsr_setup:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
- name: Play for testing dns support
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
|
|
@ -14,11 +12,14 @@
|
|||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
|
||||
- name: Import network role
|
||||
import_role:
|
||||
|
|
@ -116,18 +117,22 @@
|
|||
- "'9999' in ipv6_dns.stdout"
|
||||
msg: "DNS priority is configured incorrectly"
|
||||
|
||||
- import_playbook: down_profile+delete_interface.yml
|
||||
- name: Import the playbook 'down_profile+delete_interface.yml'
|
||||
import_playbook: down_profile+delete_interface.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: Assert profile and device are absent
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/assert_profile_absent.yml
|
||||
- name: Include the task 'assert_profile_absent.yml'
|
||||
include_tasks: tasks/assert_profile_absent.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing match path setting
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Import network role
|
||||
import_role:
|
||||
|
|
@ -19,7 +20,8 @@
|
|||
dhcp4: false
|
||||
address:
|
||||
- 192.0.2.3/24
|
||||
- block:
|
||||
- name: Test match path setting
|
||||
block:
|
||||
- name: Get match.path setting for connection
|
||||
command: nmcli -f match.path connection show pseudo-pci-test-only
|
||||
register: match_path
|
||||
|
|
@ -64,7 +66,8 @@
|
|||
- "'pci-0001:00:00.0' not in clear_path.stdout"
|
||||
msg: "The PCI address is not removed"
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for showing the network provider
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Show inside ethernet tests
|
||||
debug:
|
||||
|
|
@ -20,11 +21,14 @@
|
|||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
|
||||
- name: Test static interface up
|
||||
hosts: all
|
||||
|
|
@ -40,9 +44,11 @@
|
|||
roles:
|
||||
- linux-system-roles.network
|
||||
tasks:
|
||||
- include_tasks: tasks/assert_output_in_stderr_without_warnings.yml
|
||||
- name: Include the task 'assert_output_in_stderr_without_warnings.yml'
|
||||
include_tasks: tasks/assert_output_in_stderr_without_warnings.yml
|
||||
|
||||
- hosts: all
|
||||
- name: Play for cleaning up the test device and the connection profile
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Show network_provider
|
||||
debug:
|
||||
|
|
@ -50,17 +56,21 @@
|
|||
|
||||
# FIXME: assert profile present
|
||||
# FIXME: assert profile/device up + IP address
|
||||
- import_playbook: down_profile+delete_interface.yml
|
||||
- name: Import the playbook 'down_profile+delete_interface.yml'
|
||||
import_playbook: down_profile+delete_interface.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: Assert device and profile are absent
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/assert_profile_absent.yml
|
||||
- name: Include the task 'assert_profile_absent.yml'
|
||||
include_tasks: tasks/assert_profile_absent.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing ethtool coalesce settings
|
||||
hosts: all
|
||||
vars:
|
||||
interface: testnic1
|
||||
type: veth
|
||||
|
|
@ -14,17 +15,21 @@
|
|||
- name: "INIT: Ethtool coalesce tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Install ethtool (test dependency)
|
||||
package:
|
||||
name: ethtool
|
||||
state: present
|
||||
|
||||
- block:
|
||||
- name: Test ethtool coalesce settings
|
||||
block:
|
||||
- name: >-
|
||||
TEST: I can create a profile without any coalescing option.
|
||||
debug:
|
||||
|
|
@ -151,7 +156,8 @@
|
|||
- network_provider == "initscripts"
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -162,6 +168,7 @@
|
|||
- name: "{{ interface }}"
|
||||
persistent_state: absent
|
||||
failed_when: false
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing ethtool features settings
|
||||
hosts: all
|
||||
vars:
|
||||
interface: testnic1
|
||||
type: veth
|
||||
|
|
@ -14,18 +15,22 @@
|
|||
- name: "INIT: Ethtool feeatures tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Install ethtool (test dependency)
|
||||
package:
|
||||
name: ethtool
|
||||
state: present
|
||||
|
||||
|
||||
- block:
|
||||
- name: Test ethtool features settings
|
||||
block:
|
||||
- name: >-
|
||||
TEST: I can create a profile without changing the ethtool features.
|
||||
debug:
|
||||
|
|
@ -136,7 +141,8 @@
|
|||
TEST: Change feature with both underscores and dashes.
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- network_connections:
|
||||
- name: Configure ethtool features setting
|
||||
network_connections:
|
||||
provider: "{{ network_provider | mandatory }}"
|
||||
connections:
|
||||
- name: "{{ interface }}"
|
||||
|
|
@ -155,12 +161,15 @@
|
|||
- name: Show network_connections result
|
||||
debug:
|
||||
var: __network_connections_result
|
||||
- assert:
|
||||
- name: Assert the duplicate key "tx_tcp_segmentation"
|
||||
configuration error happened
|
||||
assert:
|
||||
that:
|
||||
- '{{ "fatal error: configuration error:
|
||||
connections[0].ethtool.features: duplicate key
|
||||
''tx_tcp_segmentation''" in
|
||||
__network_connections_result.msg }}'
|
||||
|
||||
always:
|
||||
- name: Check failure
|
||||
debug:
|
||||
|
|
@ -196,7 +205,8 @@
|
|||
when:
|
||||
network_provider == 'nm'
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -208,6 +218,7 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing ethtool ring settings
|
||||
hosts: all
|
||||
vars:
|
||||
interface: testnic1
|
||||
type: veth
|
||||
|
|
@ -14,17 +15,21 @@
|
|||
- name: "INIT: Ethtool ring tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Install ethtool (test dependency)
|
||||
package:
|
||||
name: ethtool
|
||||
state: present
|
||||
|
||||
- block:
|
||||
- name: Test ethtool ring settings
|
||||
block:
|
||||
- name: >-
|
||||
TEST: I can create a profile without any ring option.
|
||||
debug:
|
||||
|
|
@ -192,7 +197,8 @@
|
|||
- network_provider == "initscripts"
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -203,6 +209,7 @@
|
|||
- name: "{{ interface }}"
|
||||
persistent_state: absent
|
||||
failed_when: false
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing infiniband device
|
||||
hosts: all
|
||||
tags:
|
||||
- "tests::infiniband"
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test infiniband device
|
||||
block:
|
||||
- name: TEST Configuring infiniband devices
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -64,7 +66,8 @@
|
|||
changed_when: false
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test devices and the connection profiles
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -79,6 +82,7 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- command: ip link del ib0.000a
|
||||
- name: Delete the device 'ib0.000a'
|
||||
command: ip link del ib0.000a
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing IPv6 config
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
interface: veth0
|
||||
tasks:
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- name: Set up gateway ip on veth peer
|
||||
|
|
@ -19,7 +22,8 @@
|
|||
# netns not available on RHEL/CentOS 6
|
||||
- ansible_distribution_major_version != '6'
|
||||
changed_when: false
|
||||
- block:
|
||||
- name: Test IPv6 config
|
||||
block:
|
||||
- name: >-
|
||||
TEST: I can configure an interface with static ipv6 config
|
||||
debug:
|
||||
|
|
@ -40,8 +44,10 @@
|
|||
- "2001:db8::3/32"
|
||||
- "2001:db8::4/32"
|
||||
gateway6: "2001:db8::1"
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: Get ip address information
|
||||
|
|
@ -91,7 +97,8 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- name: Clean up namespace
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
- name: Play for testing ipv6 disabled
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
|
|
@ -13,11 +11,14 @@
|
|||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
|
||||
- name: Initialize the connection_failed flag
|
||||
set_fact:
|
||||
|
|
@ -70,21 +71,26 @@
|
|||
connection_failed: true
|
||||
when: __network_connections_result.failed
|
||||
|
||||
- import_playbook: down_profile.yml
|
||||
- name: Import the playbook 'down_profile.yml'
|
||||
import_playbook: down_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
when: not connection_failed
|
||||
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: Delete the interface, then assert that device and profile are absent
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/delete_interface.yml
|
||||
- include_tasks: tasks/assert_profile_absent.yml
|
||||
- name: Include the task 'delete_interface.yml'
|
||||
include_tasks: tasks/delete_interface.yml
|
||||
- name: Include the task 'assert_profile_absent.yml'
|
||||
include_tasks: tasks/assert_profile_absent.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
- hosts: all
|
||||
- name: Play for testing DNS search setting
|
||||
hosts: all
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test DNS search setting
|
||||
block:
|
||||
- name: Configure the static IPv4 address and not configure the IPv6
|
||||
address
|
||||
import_role:
|
||||
|
|
@ -146,10 +148,12 @@
|
|||
when: ansible_distribution_major_version | int > 7
|
||||
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- import_role:
|
||||
- name: Deactivate the connection and remove the connection profile
|
||||
import_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
- name: Play for configuring network using network state variable
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
|
|
@ -15,20 +13,26 @@
|
|||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface0 }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: "Set type={{ type }} and interface={{ interface1 }}" # noqa name
|
||||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface1 }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
|
||||
|
||||
- name: Configure the IP addresses
|
||||
|
|
@ -207,12 +211,16 @@
|
|||
delay: 2
|
||||
changed_when: false
|
||||
|
||||
- include_tasks: tasks/delete_interface.yml
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'delete_interface.yml'
|
||||
include_tasks: tasks/delete_interface.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
- name: "Set interface={{ interface0 }}"
|
||||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface0 }}"
|
||||
- include_tasks: tasks/delete_interface.yml
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'delete_interface.yml'
|
||||
include_tasks: tasks/delete_interface.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing provider
|
||||
hosts: all
|
||||
vars:
|
||||
interface: testnic1
|
||||
profile: "{{ interface }}"
|
||||
|
|
@ -14,10 +15,13 @@
|
|||
- always
|
||||
|
||||
|
||||
- tags:
|
||||
- name: Test managing a veth interface with NM provider after managing it
|
||||
with initscripts provider
|
||||
tags:
|
||||
- tests::provider:initscripts_to_nm
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
state: present
|
||||
lsr_description: I can manage a veth interface with NM after I
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
# of via Ansible. Until there is better test support for this, just check the
|
||||
# log output for the respective log message.
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing reapplying the connection
|
||||
hosts: all
|
||||
vars:
|
||||
interface: rpltstbr
|
||||
profile: "{{ interface }}"
|
||||
|
|
@ -13,12 +14,15 @@
|
|||
- name: Show test banner
|
||||
debug:
|
||||
msg: Inside states tests
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test reapply the connection
|
||||
block:
|
||||
# create test profile
|
||||
- name: Include network role
|
||||
include_role:
|
||||
|
|
@ -31,8 +35,10 @@
|
|||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
# Use internal module to get output
|
||||
- name: Get network_connections output
|
||||
network_connections:
|
||||
|
|
@ -57,16 +63,19 @@
|
|||
fail_msg: Reapply not found in log output
|
||||
that: "{{ 'connection reapplied' in test_module_run.stderr }}"
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
block:
|
||||
# Use internal module directly for speedup
|
||||
- network_connections:
|
||||
- name: Deactivate the connection and remove the connection profile
|
||||
network_connections:
|
||||
provider: nm
|
||||
connections:
|
||||
- name: "{{ interface }}"
|
||||
persistent_state: absent
|
||||
state: down
|
||||
- command: ip link del "{{ interface }}"
|
||||
- name: Delete the device '{{ interface }}'
|
||||
command: ip link del "{{ interface }}"
|
||||
changed_when: false
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
- name: Play for testing route table
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
|
|
@ -14,11 +12,14 @@
|
|||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
|
||||
- name: Configure connection profile and specify the numeric table in
|
||||
static routes
|
||||
|
|
@ -133,18 +134,22 @@
|
|||
state: absent
|
||||
path: /etc/iproute2/rt_tables.d/table.conf
|
||||
|
||||
- import_playbook: down_profile+delete_interface.yml
|
||||
- name: Import the playbook 'down_profile+delete_interface.yml'
|
||||
import_playbook: down_profile+delete_interface.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: Assert device and profile are absent
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/assert_profile_absent.yml
|
||||
- name: Include the task 'assert_profile_absent.yml'
|
||||
include_tasks: tasks/assert_profile_absent.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
- name: Test for testing routing rules
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
|
|
@ -13,11 +11,14 @@
|
|||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
|
||||
- name: Create a dedicated test file in `/etc/iproute2/rt_tables.d/` and
|
||||
add a new routing table
|
||||
|
|
@ -242,18 +243,22 @@
|
|||
state: absent
|
||||
path: /etc/iproute2/rt_tables.d/table.conf
|
||||
|
||||
- import_playbook: down_profile+delete_interface.yml
|
||||
- name: Import the playbook 'down_profile+delete_interface.yml'
|
||||
import_playbook: down_profile+delete_interface.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove_profile.yml
|
||||
- name: Import the playbook 'remove_profile.yml'
|
||||
import_playbook: remove_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- name: Assert device and profile are absent
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/assert_profile_absent.yml
|
||||
- name: Include the task 'assert_profile_absent.yml'
|
||||
include_tasks: tasks/assert_profile_absent.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing states
|
||||
hosts: all
|
||||
vars:
|
||||
interface: statebr
|
||||
profile: "{{ interface }}"
|
||||
|
|
@ -14,10 +15,12 @@
|
|||
- always
|
||||
|
||||
|
||||
- tags:
|
||||
- name: Test creating the bridge connection
|
||||
tags:
|
||||
- tests::states:create
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: I can create a profile
|
||||
lsr_setup:
|
||||
|
|
@ -35,10 +38,12 @@
|
|||
lsr_cleanup:
|
||||
- tasks/cleanup_profile+device.yml
|
||||
|
||||
- tags:
|
||||
- name: Test creating the bridge connection without autoconnect
|
||||
tags:
|
||||
- tests::states:create_without_autoconnect
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: I can create a profile without autoconnect
|
||||
lsr_setup:
|
||||
|
|
@ -53,10 +58,12 @@
|
|||
lsr_cleanup:
|
||||
- tasks/cleanup_profile+device.yml
|
||||
|
||||
- tags:
|
||||
- name: Test activating the bridge connection
|
||||
tags:
|
||||
- tests::states:activate
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: I can activate an existing profile
|
||||
lsr_setup:
|
||||
|
|
@ -69,10 +76,12 @@
|
|||
lsr_cleanup:
|
||||
- tasks/cleanup_profile+device.yml
|
||||
|
||||
- tags:
|
||||
- name: Test removing the bridge connection profile without taking it down
|
||||
tags:
|
||||
- tests::states:remove_up
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: I can remove an existing profile without taking it
|
||||
down
|
||||
|
|
@ -87,10 +96,12 @@
|
|||
lsr_cleanup:
|
||||
- tasks/cleanup_profile+device.yml
|
||||
|
||||
- tags:
|
||||
- name: Test removing the bridge connection profile and taking it down
|
||||
tags:
|
||||
- tests::states:remove_down
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: I can take a profile down that is absent
|
||||
lsr_setup:
|
||||
|
|
@ -107,10 +118,13 @@
|
|||
lsr_cleanup:
|
||||
- tasks/cleanup_profile+device.yml
|
||||
|
||||
- tags:
|
||||
- name: Test removing the bridge connection profile and taking it down
|
||||
twice
|
||||
tags:
|
||||
- tests::states:remove_down_twice
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: I will not get an error when I try to
|
||||
remove an absent profile
|
||||
|
|
|
|||
|
|
@ -23,12 +23,15 @@
|
|||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/remove+down_profile.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'remove+down_profile.yml'
|
||||
include_tasks: tasks/remove+down_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# The initscripts should not remove the interface for down/absent
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Set fact to use nm network_provider
|
||||
set_fact:
|
||||
network_provider: nm
|
||||
|
|
@ -45,11 +48,16 @@
|
|||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/remove+down_profile.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'remove+down_profile.yml'
|
||||
include_tasks: tasks/remove+down_profile.yml
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# NetworkManager should not remove pre-exist interface for down/absent
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- include_tasks: tasks/delete_interface.yml
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'delete_interface.yml'
|
||||
include_tasks: tasks/delete_interface.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: tasks/assert_device_absent.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing team connection
|
||||
hosts: all
|
||||
vars:
|
||||
interface: team0
|
||||
profile: "{{ interface }}"
|
||||
|
|
@ -13,10 +14,12 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- tags:
|
||||
- name: Test the team connection
|
||||
tags:
|
||||
- tests::team:create
|
||||
block:
|
||||
- include_tasks: tasks/run_test.yml
|
||||
- name: Include the task 'run_test.yml'
|
||||
include_tasks: tasks/run_test.yml
|
||||
vars:
|
||||
lsr_description: Create a team interface without any port attached
|
||||
lsr_setup:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing team plugin installation
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Remove the NetworkManager-team package
|
||||
package:
|
||||
|
|
|
|||
|
|
@ -1,16 +1,20 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing vlan mtu setting
|
||||
hosts: all
|
||||
vars:
|
||||
type: veth
|
||||
interface: lsr101
|
||||
vlan_interface: lsr101.90
|
||||
tasks:
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: >-
|
||||
TEST: I can configure the MTU for a vlan interface without autoconnect.
|
||||
debug:
|
||||
|
|
@ -39,10 +43,12 @@
|
|||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ vlan_interface }}"
|
||||
- include_tasks: tasks/assert_profile_present.yml
|
||||
- name: Include the task 'assert_profile_present.yml'
|
||||
include_tasks: tasks/assert_profile_present.yml
|
||||
vars:
|
||||
profile: "{{ item }}"
|
||||
loop:
|
||||
|
|
@ -64,6 +70,7 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing wireless connection
|
||||
hosts: all
|
||||
vars:
|
||||
interface: wlan0
|
||||
tasks:
|
||||
- name: "INIT: wireless tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/setup_mock_wifi.yml
|
||||
- name: Include the task 'setup_mock_wifi.yml'
|
||||
include_tasks: tasks/setup_mock_wifi.yml
|
||||
- name: Copy client certs
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
|
|
@ -17,7 +19,8 @@
|
|||
- client.key
|
||||
- client.pem
|
||||
- cacert.pem
|
||||
- block:
|
||||
- name: Test wireless connection with WPA-PSK
|
||||
block:
|
||||
- name: "TEST: wireless connection with WPA-PSK"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
@ -77,7 +80,8 @@
|
|||
client_cert: /etc/pki/tls/client.pem
|
||||
ca_cert: /etc/pki/tls/cacert.pem
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- name: Import network role
|
||||
|
|
@ -89,4 +93,5 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
failed_when: false
|
||||
- include_tasks: tasks/cleanup_mock_wifi.yml
|
||||
- name: Include the task 'cleanup_mock_wifi.yml'
|
||||
include_tasks: tasks/cleanup_mock_wifi.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing wireless plugin installation
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Remove the NetworkManager-wifi package
|
||||
package:
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing wireless connection
|
||||
hosts: all
|
||||
vars:
|
||||
interface: wlan0
|
||||
tasks:
|
||||
- name: "INIT: wireless tests"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
- include_tasks: tasks/setup_mock_wifi_wpa3_owe.yml
|
||||
- block:
|
||||
- name: Include the task 'setup_mock_wifi_wpa3_owe.yml'
|
||||
include_tasks: tasks/setup_mock_wifi_wpa3_owe.yml
|
||||
- name: Test wireless connection with OWE
|
||||
block:
|
||||
- name: "TEST: wireless connection with OWE"
|
||||
debug:
|
||||
msg: "##################################################"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
- name: Play for testing wireless connection
|
||||
hosts: all
|
||||
vars:
|
||||
interface: wlan0
|
||||
tasks:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
- hosts: all
|
||||
- name: Play for setting up snapshots
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Set facts used by role
|
||||
include_role:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: get_interface_stat.yml
|
||||
- name: Include the task 'get_interface_stat.yml'
|
||||
include_tasks: get_interface_stat.yml
|
||||
- name: "Assert that the interface is absent - '{{ interface }}'"
|
||||
assert:
|
||||
that: not interface_stat.stat.exists
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: get_interface_stat.yml
|
||||
- name: Include the task 'get_interface_stat.yml'
|
||||
include_tasks: get_interface_stat.yml
|
||||
- name: "Assert that the interface is present - '{{ interface }}'"
|
||||
assert:
|
||||
that: interface_stat.stat.exists
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: get_profile_stat.yml
|
||||
- name: Include the task 'get_profile_stat.yml'
|
||||
include_tasks: get_profile_stat.yml
|
||||
- name: "Assert that the profile is absent - '{{ profile }}'"
|
||||
assert:
|
||||
that: not lsr_net_profile_exists
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: get_profile_stat.yml
|
||||
- name: Include the task 'get_profile_stat.yml'
|
||||
include_tasks: get_profile_stat.yml
|
||||
- name: "Assert that the profile is present - '{{ profile }}'"
|
||||
assert:
|
||||
that: lsr_net_profile_exists
|
||||
|
|
|
|||
|
|
@ -1,20 +1,30 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: show_interfaces.yml
|
||||
- include_tasks: manage_test_interface.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: show_interfaces.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- include_tasks: show_interfaces.yml
|
||||
- include_tasks: assert_device_absent.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: show_interfaces.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: assert_device_absent.yml
|
||||
|
||||
- include_tasks: manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: show_interfaces.yml
|
||||
- include_tasks: assert_device_present.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: show_interfaces.yml
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: assert_device_present.yml
|
||||
|
||||
- include_tasks: manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- include_tasks: show_interfaces.yml
|
||||
- include_tasks: assert_device_absent.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: show_interfaces.yml
|
||||
- name: Include the task 'assert_device_absent.yml'
|
||||
include_tasks: assert_device_absent.yml
|
||||
|
|
|
|||
|
|
@ -37,4 +37,5 @@
|
|||
when:
|
||||
- ansible_distribution == 'CentOS'
|
||||
- ansible_distribution_major_version == '6'
|
||||
- include_tasks: enable_epel.yml
|
||||
- name: Include the task 'enable_epel.yml'
|
||||
include_tasks: enable_epel.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- when:
|
||||
- name: Create EPEL yum repo and Enable EPEL
|
||||
when:
|
||||
- ansible_distribution in ['RedHat', 'CentOS']
|
||||
- ansible_distribution_major_version in ['7', '8']
|
||||
block:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- tags:
|
||||
- name: Get NetworkManager version
|
||||
tags:
|
||||
- always
|
||||
block:
|
||||
- name: Get NetworkManager RPM version
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
msg: "type needs to be dummy, tap or veth, not '{{ type }}'"
|
||||
when: type not in ["dummy", "tap", "veth"]
|
||||
|
||||
- include_tasks: show_interfaces.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: show_interfaces.yml
|
||||
|
||||
- name: Install iproute
|
||||
package:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
- lsr_fail_debug
|
||||
- lsr_cleanup
|
||||
|
||||
- include_tasks: tasks/show_interfaces.yml
|
||||
- name: Include the task 'show_interfaces.yml'
|
||||
include_tasks: tasks/show_interfaces.yml
|
||||
|
||||
- name: Setup
|
||||
include_tasks: "{{ item }}"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
- include_tasks: tasks/setup_802_1x_server.yml
|
||||
- name: Include the task 'setup_802_1x_server.yml'
|
||||
include_tasks: tasks/setup_802_1x_server.yml
|
||||
- name: Copy client certs
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
|
|
|
|||
|
|
@ -57,4 +57,5 @@
|
|||
dest: /etc/hostapd/wireless.conf
|
||||
mode: "0644"
|
||||
|
||||
- include_tasks: tasks/start_mock_wifi.yml
|
||||
- name: Include the task 'start_mock_wifi.yml'
|
||||
include_tasks: tasks/start_mock_wifi.yml
|
||||
|
|
|
|||
|
|
@ -59,4 +59,5 @@
|
|||
dest: /etc/hostapd/wireless.conf
|
||||
mode: "0644"
|
||||
|
||||
- include_tasks: tasks/start_mock_wifi.yml
|
||||
- name: Include the task 'start_mock_wifi.yml'
|
||||
include_tasks: tasks/start_mock_wifi.yml
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
type: veth
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- include_tasks: get_current_interfaces.yml
|
||||
- name: Include the task 'get_current_interfaces.yml'
|
||||
include_tasks: get_current_interfaces.yml
|
||||
- name: Show current_interfaces
|
||||
debug:
|
||||
msg: "current_interfaces: {{ current_interfaces }}"
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@
|
|||
# noqa command-instead-of-module
|
||||
register: __network_nm_nvr
|
||||
changed_when: false
|
||||
- block:
|
||||
- name: Test configuring 802.1x authentication
|
||||
block:
|
||||
- name: Import network role
|
||||
import_role:
|
||||
name: linux-system-roles.network
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_802_1x.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,7 +16,8 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_802_1x.yml
|
||||
- name: Import the playbook 'playbooks/tests_802_1x.yml'
|
||||
import_playbook: playbooks/tests_802_1x.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
- ansible_distribution != 'RedHat' or
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_802_1x_updated.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,7 +16,8 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_802_1x_updated.yml
|
||||
- name: Import the playbook 'playbooks/tests_802_1x_updated.yml'
|
||||
import_playbook: playbooks/tests_802_1x_updated.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
- ansible_distribution != 'RedHat' or
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_auto_gateway.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_auto_gateway.yml
|
||||
- name: Import the playbook 'playbooks/tests_auto_gateway.yml'
|
||||
import_playbook: playbooks/tests_auto_gateway.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_auto_gateway.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_auto_gateway.yml
|
||||
- name: Import the playbook 'playbooks/tests_auto_gateway.yml'
|
||||
import_playbook: playbooks/tests_auto_gateway.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_cloned_mac.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_bond_cloned_mac.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_cloned_mac.yml'
|
||||
import_playbook: playbooks/tests_bond_cloned_mac.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_cloned_mac.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bond_cloned_mac.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_cloned_mac.yml'
|
||||
import_playbook: playbooks/tests_bond_cloned_mac.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_deprecated.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_bond_deprecated.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_deprecated.yml'
|
||||
import_playbook: playbooks/tests_bond_deprecated.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_deprecated.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bond_deprecated.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_deprecated.yml'
|
||||
import_playbook: playbooks/tests_bond_deprecated.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_bond.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond.yml'
|
||||
import_playbook: playbooks/tests_bond.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bond.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond.yml'
|
||||
import_playbook: playbooks/tests_bond.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_options.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bond_options.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_options.yml'
|
||||
import_playbook: playbooks/tests_bond_options.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_removal.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_bond_removal.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_removal.yml'
|
||||
import_playbook: playbooks/tests_bond_removal.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bond_removal.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bond_removal.yml
|
||||
- name: Import the playbook 'playbooks/tests_bond_removal.yml'
|
||||
import_playbook: playbooks/tests_bond_removal.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bridge_cloned_mac.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_bridge_cloned_mac.yml
|
||||
- name: Import the playbook 'playbooks/tests_bridge_cloned_mac.yml'
|
||||
import_playbook: playbooks/tests_bridge_cloned_mac.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bridge_cloned_mac.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bridge_cloned_mac.yml
|
||||
- name: Import the playbook 'playbooks/tests_bridge_cloned_mac.yml'
|
||||
import_playbook: playbooks/tests_bridge_cloned_mac.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bridge.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_bridge.yml
|
||||
- name: Import the playbook 'playbooks/tests_bridge.yml'
|
||||
import_playbook: playbooks/tests_bridge.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_bridge.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_bridge.yml
|
||||
- name: Import the playbook 'playbooks/tests_bridge.yml'
|
||||
import_playbook: playbooks/tests_bridge.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -7,12 +7,16 @@
|
|||
type: veth
|
||||
name: Test change indication on repeat run
|
||||
tasks:
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- block:
|
||||
- vars:
|
||||
- name: Include the task 'assert_device_present.yml'
|
||||
include_tasks: tasks/assert_device_present.yml
|
||||
- name: Test change indication on repeat run
|
||||
block:
|
||||
- name: Configure the static IPv4 address for ethernet device
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ interface }}"
|
||||
state: up
|
||||
|
|
@ -21,19 +25,22 @@
|
|||
address:
|
||||
- 192.0.2.2/24
|
||||
block:
|
||||
- include_role:
|
||||
- name: Include the network role
|
||||
include_role:
|
||||
name: linux-system-roles.network
|
||||
register: __network_connections_result
|
||||
- name: Assert change:true
|
||||
assert:
|
||||
that: __network_connections_result is changed
|
||||
- include_role:
|
||||
- name: Include the network role
|
||||
include_role:
|
||||
name: linux-system-roles.network
|
||||
register: __network_connections_result
|
||||
- name: Assert change:false
|
||||
assert:
|
||||
that: not __network_connections_result is changed
|
||||
- vars:
|
||||
- name: Configure the ethernet device without enabling the IPv4 and IPv6
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ interface }}"
|
||||
state: up
|
||||
|
|
@ -42,23 +49,27 @@
|
|||
dhcp4: "no"
|
||||
auto6: "no"
|
||||
block:
|
||||
- include_role:
|
||||
- name: Include the network role
|
||||
include_role:
|
||||
name: linux-system-roles.network
|
||||
register: __network_connections_result
|
||||
- name: Assert change:true
|
||||
assert:
|
||||
that: __network_connections_result is changed
|
||||
- include_role:
|
||||
- name: Include the network role
|
||||
include_role:
|
||||
name: linux-system-roles.network
|
||||
register: __network_connections_result
|
||||
- name: Assert change:false
|
||||
assert:
|
||||
that: not __network_connections_result is changed
|
||||
always:
|
||||
- tags:
|
||||
- name: Clean up the test device and the connection profile
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
block:
|
||||
- include_role:
|
||||
- name: Include the network role
|
||||
include_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
|
|
@ -66,6 +77,7 @@
|
|||
persistent_state: absent
|
||||
state: down
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
- name: Include the task 'manage_test_interface.yml'
|
||||
include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
roles:
|
||||
- linux-system-roles.network
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Test warning and info logs
|
||||
assert:
|
||||
that:
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
name: Run playbook 'tests_default.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
|
||||
- import_playbook: tests_default.yml
|
||||
- name: Import the playbook 'tests_default.yml'
|
||||
import_playbook: tests_default.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
name: Run playbook 'tests_default.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
||||
# The test should run with NetworkManager, therefore it cannot run on
|
||||
# RHEL/CentOS 6
|
||||
- import_playbook: tests_default.yml
|
||||
- name: Import the playbook 'tests_default.yml'
|
||||
import_playbook: tests_default.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_dummy.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_dummy.yml
|
||||
- name: Import the playbook 'playbooks/tests_dummy.yml'
|
||||
import_playbook: playbooks/tests_dummy.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_eth_dns_support.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_eth_dns_support.yml
|
||||
- name: Import the playbook 'playbooks/tests_eth_dns_support.yml'
|
||||
import_playbook: playbooks/tests_eth_dns_support.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_eth_pci_address_match.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
||||
- when:
|
||||
- name: Install NetworkManager and get NetworkManager version
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
tags:
|
||||
- always
|
||||
|
|
@ -37,7 +39,8 @@
|
|||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
# NetworkManager 1.26.0 added support for match.path setting
|
||||
- import_playbook: playbooks/tests_eth_pci_address_match.yml
|
||||
- name: Import the playbook 'playbooks/tests_eth_pci_address_match.yml'
|
||||
import_playbook: playbooks/tests_eth_pci_address_match.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethernet.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_ethernet.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethernet.yml'
|
||||
import_playbook: playbooks/tests_ethernet.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethernet.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_ethernet.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethernet.yml'
|
||||
import_playbook: playbooks/tests_ethernet.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethtool_coalesce.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_ethtool_coalesce.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethtool_coalesce.yml'
|
||||
import_playbook: playbooks/tests_ethtool_coalesce.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethtool_coalesce.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
||||
- when:
|
||||
- name: Install NetworkManager and get NetworkManager version
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
tags:
|
||||
- always
|
||||
|
|
@ -37,7 +39,8 @@
|
|||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
# NetworkManager 1.25.1 introduced ethtool coalesce support
|
||||
- import_playbook: playbooks/tests_ethtool_coalesce.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethtool_coalesce.yml'
|
||||
import_playbook: playbooks/tests_ethtool_coalesce.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethtool_features.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_ethtool_features.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethtool_features.yml'
|
||||
import_playbook: playbooks/tests_ethtool_features.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethtool_features.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
||||
- when:
|
||||
- name: Install NetworkManager and get NetworkManager version
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
tags:
|
||||
- always
|
||||
|
|
@ -37,7 +39,8 @@
|
|||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
# NetworkManager 1.20.0 introduced ethtool settings support
|
||||
- import_playbook: playbooks/tests_ethtool_features.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethtool_features.yml'
|
||||
import_playbook: playbooks/tests_ethtool_features.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethtool_ring.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_ethtool_ring.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethtool_ring.yml'
|
||||
import_playbook: playbooks/tests_ethtool_ring.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ethtool_ring.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
||||
- when:
|
||||
- name: Install NetworkManager and get NetworkManager version
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
tags:
|
||||
- always
|
||||
|
|
@ -37,7 +39,8 @@
|
|||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
# NetworkManager 1.25.2 introduced ethtool ring support
|
||||
- import_playbook: playbooks/tests_ethtool_ring.yml
|
||||
- name: Import the playbook 'playbooks/tests_ethtool_ring.yml'
|
||||
import_playbook: playbooks/tests_ethtool_ring.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
- name: Check that creating and removing test devices and assertions work
|
||||
hosts: all
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
|
||||
- name: Test veth interface management
|
||||
include_tasks: tasks/create_and_remove_interface.yml
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_infiniband.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_infiniband.yml
|
||||
- name: Import the playbook 'playbooks/tests_infiniband.yml'
|
||||
import_playbook: playbooks/tests_infiniband.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
name: Run playbook 'playbooks/integration_pytest_python3.yml'
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
|
||||
- import_playbook: playbooks/integration_pytest_python3.yml
|
||||
- name: Import the playbook 'playbooks/integration_pytest_python3.yml'
|
||||
import_playbook: playbooks/integration_pytest_python3.yml
|
||||
when: (ansible_distribution in ["CentOS", "RedHat"] and
|
||||
ansible_distribution_major_version == "8") or
|
||||
ansible_distribution == "Fedora"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ipv6_disabled.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_ipv6_disabled.yml
|
||||
- name: Import the playbook 'playbooks/tests_ipv6_disabled.yml'
|
||||
import_playbook: playbooks/tests_ipv6_disabled.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ipv6_dns_search.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_ipv6_dns_search.yml
|
||||
- name: Import the playbook 'playbooks/tests_ipv6_dns_search.yml'
|
||||
import_playbook: playbooks/tests_ipv6_dns_search.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ipv6.yml' with initscripts as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Include the task 'el_repo_setup.yml'
|
||||
include_tasks: tasks/el_repo_setup.yml
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
network_provider: initscripts
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_playbook: playbooks/tests_ipv6.yml
|
||||
- name: Import the playbook 'playbooks/tests_ipv6.yml'
|
||||
import_playbook: playbooks/tests_ipv6.yml
|
||||
when: (ansible_distribution in ['CentOS','RedHat'] and
|
||||
ansible_distribution_major_version | int < 9)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_ipv6.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_ipv6.yml
|
||||
- name: Import the playbook 'playbooks/tests_ipv6.yml'
|
||||
import_playbook: playbooks/tests_ipv6.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_network_state.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
|
@ -15,7 +16,8 @@
|
|||
|
||||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
- import_playbook: playbooks/tests_network_state.yml
|
||||
- name: Import the playbook 'playbooks/tests_network_state.yml'
|
||||
import_playbook: playbooks/tests_network_state.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
- ansible_distribution_major_version | int > 7
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_provider.yml' with nm as provider
|
||||
tasks:
|
||||
- include_tasks: tasks/el_repo_setup.yml
|
||||
- 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
|
||||
|
||||
- when:
|
||||
- name: Install NetworkManager and get NetworkManager version
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
tags:
|
||||
- always
|
||||
|
|
@ -37,7 +39,8 @@
|
|||
# The test requires or should run with NetworkManager, therefore it cannot run
|
||||
# on RHEL/CentOS 6
|
||||
# NetworKmanager 1.20.0 added support for forgetting profiles
|
||||
- import_playbook: playbooks/tests_provider.yml
|
||||
- name: Import the playbook 'playbooks/tests_provider.yml'
|
||||
import_playbook: playbooks/tests_provider.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue