[CI] Drop Python 3.7 job. Fix ansible-lint errors.

Two changes to fix CI:
- Drop Python 3.7 job as Victoria is in extended maintenance now [1][2]
- Name tasks to fix 'unnamed-task' ansible-lint errors

[1]: https://review.opendev.org/c/openstack/governance/+/693743
[2]: https://review.opendev.org/c/openstack/governance/+/743847

Change-Id: I7324467e54deda1a05063cfa1b52a276f7622442
This commit is contained in:
Bartosz Bezak 2022-07-25 14:29:55 +02:00
parent dcbaa41699
commit d7312db645
8 changed files with 32 additions and 24 deletions

View File

@ -21,7 +21,8 @@
tags:
- host-setup
tasks:
- block:
- name: Set up host
block:
- name: Configure host for Libvirt
include_role:
name: stackhpc.libvirt-host

View File

@ -29,7 +29,8 @@
# Don't remove log directory during teardown to preserve historical logs.
when: cmd != 'teardown'
- block:
- name: Check if OVS is installed
block:
- name: Check if ovs-vsctl command is present
command: ovs-vsctl --version
register: ovs_vsctl_check

View File

@ -35,7 +35,8 @@
source_type: linuxbridge
when: if_details.stdout_lines[-1].split()[0] == 'bridge'
- block:
- name: Register source interface as an Open vSwitch bridge
block:
- name: Get list of OVS bridges
command: ovs-vsctl list-br
register: ovs_bridges
@ -58,7 +59,8 @@
become: true
when: bridge_type == "openvswitch"
- block:
- name: Create Tenks bridge
block:
- name: Check if Tenks bridge exists
stat:
path: /sys/class/net/{{ tenks_bridge }}
@ -131,7 +133,7 @@
state: "{{ state }}"
become: true
- name: Plug source interface into Tenks bridge
- name: Plug source interface into Tenks OVS bridge
openvswitch_port:
bridge: "{{ tenks_bridge }}"
port: "{{ source_interface }}"
@ -144,7 +146,8 @@
- state != 'absent'
become: true
- block:
- name: Plug source interface into Tenks Linux bridge
block:
- name: Speculatively check interface's master
command: >-
realpath /sys/class/net/{{ source_interface }}/master
@ -152,7 +155,7 @@
failed_when: false
changed_when: false
- name: Plug source interface into Tenks bridge
- name: Plug source interface into Tenks Linux bridge
command: >-
{{ tenks_ip_path }} link set dev {{ source_interface }} master {{ tenks_bridge }}
changed_when: true

View File

@ -22,7 +22,8 @@
loop_control:
loop_var: spec
- block:
- name: Include the wait-for-resources role
block:
- name: Check that OpenStack credentials exist in the environment
fail:
msg: >

View File

@ -44,7 +44,8 @@
# If using clouds.yaml for authentication we need to pass in the ironic_url
# argument to the os_ironic module, due to a quirk in its implementation.
# Grab the endpoint from the file.
- block:
- name: Set ironic_url for os_ironic module
block:
- name: Query clouds.yaml
os_client_config:
clouds: "{{ lookup('env', 'OS_CLOUD') }}"

View File

@ -1,16 +1,17 @@
---
- block:
- include_tasks: is-attached.yml
vars:
bridge: "{{ veth_pair_source_bridge }}"
interface: "{{ veth_pair_source_link_name }}"
- name: Unplug veth from source bridge
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
become: true
- name: Unplug veth from source bridge
command: >-
ip link set {{ veth_pair_source_link_name }} nomaster
when:
- veth_pair_is_attached
become: true
when: veth_pair_plug_into_source | bool
- name: Delete veth pair

View File

@ -27,7 +27,8 @@
when: veth_pair_peer_bridge_type == "openvswitch"
become: true
- block:
- name: Plug veth into source bridge
block:
- include_tasks: is-attached.yml
vars:
bridge: "{{ veth_pair_peer_bridge }}"
@ -42,7 +43,8 @@
become: true
when: veth_pair_peer_bridge_type == "linuxbridge"
- block:
- name: Plug veth into source bridge
block:
- include_tasks: is-attached.yml
vars:
bridge: "{{ veth_pair_source_bridge }}"

View File

@ -9,7 +9,6 @@
jobs:
- openstack-tox-pep8
- openstack-tox-py36
- openstack-tox-py37
- openstack-tox-py38
- openstack-tox-py39
- tenks-tox-ansible-lint
@ -26,7 +25,6 @@
jobs:
- openstack-tox-pep8
- openstack-tox-py36
- openstack-tox-py37
- openstack-tox-py38
- openstack-tox-py39
- tenks-tox-ansible-lint