[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: tags:
- host-setup - host-setup
tasks: tasks:
- block: - name: Set up host
block:
- name: Configure host for Libvirt - name: Configure host for Libvirt
include_role: include_role:
name: stackhpc.libvirt-host name: stackhpc.libvirt-host

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,6 @@
--- ---
- block: - name: Unplug veth from source bridge
block:
- include_tasks: is-attached.yml - include_tasks: is-attached.yml
vars: vars:
bridge: "{{ veth_pair_source_bridge }}" bridge: "{{ veth_pair_source_bridge }}"

View File

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

View File

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