network/tests/tasks/remove_test_interfaces_with_dhcp.yml
Vladimír Beneš 6e85ffe5f2 tests: add simple bond tests for both nm and initscripts
* add a helper to create two veth devices with IPv4/IPv6 infra
 * add a bond in active-backup mode with miimon value
 * add two slaves connections for two veth devices
 * check automated IPv4/IPv6 addresses are assigned to master
 * check all connections are present
 * add a helper to delete previously created veth device setup
2020-08-20 17:06:05 +02:00

25 lines
718 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- name: Remove test interfaces
shell: |
ip link delete {{dhcp_interface1}}
ip link delete {{dhcp_interface2}}
ip link delete testbr
# Remove udev rule for NM to see veth devices starting with test*.....
rm -rf /etc/udev/rules.d/88-veth.rules
udevadm control --reload-rules
udevadm settle --timeout=5
- name: Stop dnsmasq/radvd services
shell: |
pkill -F /run/dhcp_testbr.pid
rm -rf /run/dhcp_testbr.pid
rm -rf /run/dhcp_testbr.lease
if grep 'release 6' /etc/redhat-release; then
# Stop radvd server
service radvd stop
iptables -D INPUT -i testbr -p udp --dport 67:68 --sport 67:68 -j ACCEPT
fi