2c2c8b9504
* new ansible-lint complaints * clamp ansible-lint to <7 * tox 4 support * switch to CentOS NFV Open vSwitch repository for OVS - rocky 9 RDO install was failing * switch from Kayobe CentOS stream 8 to Rocky Linux 9 and Ubuntu Jammy jobs - these are the current supported distros in Kayobe master Change-Id: Ic607ccccc866da65c100053bfa15ee141a98679e
30 lines
810 B
YAML
30 lines
810 B
YAML
---
|
|
- name: Unplug veth from source bridge
|
|
when: veth_pair_plug_into_source | bool
|
|
block:
|
|
- include_tasks: is-attached.yml
|
|
vars:
|
|
bridge: "{{ veth_pair_source_bridge }}"
|
|
interface: "{{ veth_pair_source_link_name }}"
|
|
|
|
- name: Unplug veth from source bridge
|
|
command: >-
|
|
ip link set {{ veth_pair_source_link_name }} nomaster
|
|
when:
|
|
- veth_pair_is_attached
|
|
changed_when: true
|
|
become: true
|
|
|
|
- name: Delete veth pair
|
|
command: >-
|
|
ip link del dev {{ veth_pair_peer_link_name }}
|
|
type veth
|
|
peer name {{ veth_pair_source_link_name }}
|
|
register: res
|
|
failed_when:
|
|
- res.rc != 0
|
|
# Case where veth pair is already absent.
|
|
- not (res.rc == 1 and 'Cannot find device' in res.stderr)
|
|
changed_when: res.rc == 0
|
|
become: true
|