[CI] Use ovs-vsctl to ensure bridges

The upstream openvswitch collection has been deprecated and was not
included in newer Ansible (like Ansible 11). Since jobs switched
to Ansible jobs relying on these tasks are failing.

This patch switches to use ovs bridge command same
as add-port in next tasks.

Also add the role to irrelevant-files as single node
jobs need not run on multi node role changes.

Also fixed pre-commit error by switching to
fix-byte-order-marker.

Change-Id: Ie3a40efed5e132aee53dce3db6522c551897b5f7
Signed-off-by: Yatin Karel <ykarel@redhat.com>
This commit is contained in:
2025-08-20 15:58:12 +05:30
parent 814d654963
commit ff5353e733
2 changed files with 7 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ repos:
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict

View File

@@ -5,17 +5,15 @@
block:
- name: Ensure the infra bridge exists
become: true
openvswitch_bridge:
bridge: "{{ infra_bridge_name }}"
state: present
fail_mode: standalone
command: >-
ovs-vsctl --may-exist add-br {{ infra_bridge_name }}
-- set-fail-mode {{ infra_bridge_name }} standalone
- name: Ensure the Neutron external bridge exists
become: true
openvswitch_bridge:
bridge: "{{ neutron_external_bridge_name }}"
state: present
fail_mode: standalone
command: >-
ovs-vsctl --may-exist add-br {{ neutron_external_bridge_name }}
-- set-fail-mode {{ neutron_external_bridge_name }} standalone
- name: Create patch port between bridges
become: true