network/tests/tasks/cleanup_bond_profile+device.yml
Wen Liang 910ddd20a9 test: Rewrite tests_bond_options.yml in the new testing format
The new testing format is more concise and easier to debug when test
failure happens.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-02-14 20:20:49 -07:00

26 lines
774 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- name: Clean up the test devices and the connection profiles
tags:
- "tests::cleanup"
block:
- name: Import network role
import_role:
name: linux-system-roles.network
vars:
network_connections:
- name: "{{ port2_profile }}"
persistent_state: absent
state: down
- name: "{{ port1_profile }}"
persistent_state: absent
state: down
- name: "{{ controller_profile }}"
persistent_state: absent
state: down
failed_when: false
- name: Delete the device '{{ controller_device }}'
command: ip link del {{ controller_device }}
failed_when: false
changed_when: false
...