From 9dfaabe6132213267870755cba0edd9fff860004 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Tue, 24 Jan 2023 12:31:01 +0100 Subject: [PATCH] Fix tox-linters job Change-Id: Iacaa24d6b40dae62dd79e3c02a389022f0d097d5 --- .pre-commit-config.yaml | 6 +- .../tasks/get-devstack.yaml | 2 +- .../tasks/setup-profile.yaml | 2 + .../tasks/get-ssh-config.yaml | 57 +++++++++---------- roles/multi-node-setup/tasks/main.yaml | 49 ++++++++-------- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6525f99..ffdde1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-added-large-files - id: check-byte-order-marker @@ -19,12 +19,12 @@ repos: - id: trailing-whitespace - repo: https://github.com/adrienverge/yamllint.git - rev: v1.27.1 + rev: v1.29.0 hooks: - id: yamllint files: \.(yaml|yml)$ - repo: https://opendev.org/openstack/bashate.git - rev: 2.1.0 + rev: 2.1.1 hooks: - id: bashate diff --git a/roles/devstack-tobiko-deploy/tasks/get-devstack.yaml b/roles/devstack-tobiko-deploy/tasks/get-devstack.yaml index c4606a0..a69aa66 100644 --- a/roles/devstack-tobiko-deploy/tasks/get-devstack.yaml +++ b/roles/devstack-tobiko-deploy/tasks/get-devstack.yaml @@ -15,6 +15,6 @@ git: repo: '{{ devstack_git_repo }}' dest: '{{ devstack_dir | realpath }}' - update: no + update: false become: true become_user: stack diff --git a/roles/devstack-tobiko-deploy/tasks/setup-profile.yaml b/roles/devstack-tobiko-deploy/tasks/setup-profile.yaml index 2799190..d704af8 100644 --- a/roles/devstack-tobiko-deploy/tasks/setup-profile.yaml +++ b/roles/devstack-tobiko-deploy/tasks/setup-profile.yaml @@ -1,3 +1,5 @@ +--- + - name: copy stack.sh file to /etc/profile.d/ become: true copy: diff --git a/roles/get-vagrant-ssh-config/tasks/get-ssh-config.yaml b/roles/get-vagrant-ssh-config/tasks/get-ssh-config.yaml index 6496b40..4ff617c 100644 --- a/roles/get-vagrant-ssh-config/tasks/get-ssh-config.yaml +++ b/roles/get-vagrant-ssh-config/tasks/get-ssh-config.yaml @@ -2,37 +2,36 @@ - delegate_to: localhost block: + - name: ensure '{{ tobiko_ssh_config_path | dirname }}' exists + file: + path: '{{ tobiko_ssh_config_path | dirname }}' + state: directory - - name: ensure '{{ tobiko_ssh_config_path | dirname }}' exists - file: - path: '{{ tobiko_ssh_config_path | dirname }}' - state: directory + - name: get ssh_config content' + shell: + cmd: vagrant ssh-config + chdir: '{{ devstack_plugin_tobiko_src_dir }}' + register: get_ssh_config + changed_when: false - - name: get ssh_config content' - shell: - cmd: vagrant ssh-config - chdir: '{{ devstack_plugin_tobiko_src_dir }}' - register: get_ssh_config - changed_when: false + - debug: var=get_ssh_config - - debug: var=get_ssh_config + - name: write ssh_config to file '{{ tobiko_ssh_config_path }}' + copy: + content: | + {{ get_ssh_config.stdout }} + dest: '{{ tobiko_ssh_config_path }}' - - name: write ssh_config to file '{{ tobiko_ssh_config_path }}' - copy: - content: | - {{ get_ssh_config.stdout }} - dest: '{{ tobiko_ssh_config_path }}' + - name: write ssh_config file path to {{ tobiko_config_path }} + ini_file: + path: '{{ tobiko_config_path }}' + section: ssh + option: config_files + value: '{{ tobiko_ssh_config_path }}' - - name: write ssh_config file path to {{ tobiko_config_path }} - ini_file: - path: '{{ tobiko_config_path }}' - section: ssh - option: config_files - value: '{{ tobiko_ssh_config_path }}' - - - name: write SSH proxy jump host to {{ tobiko_config_path }} - ini_file: - path: '{{ tobiko_config_path }}' - section: ssh - option: proxy_jump - value: devstack-primary + - name: write SSH proxy jump host to {{ tobiko_config_path }} + ini_file: + path: '{{ tobiko_config_path }}' + section: ssh + option: proxy_jump + value: devstack-primary diff --git a/roles/multi-node-setup/tasks/main.yaml b/roles/multi-node-setup/tasks/main.yaml index f4de2af..fc6bd6b 100644 --- a/roles/multi-node-setup/tasks/main.yaml +++ b/roles/multi-node-setup/tasks/main.yaml @@ -3,30 +3,29 @@ - name: Configure Neutron bridge for multi node setup when: "( ansible_play_hosts | length ) > 1" block: + - name: Ensure the infra bridge exists + become: true + openvswitch_bridge: + bridge: "{{ infra_bridge_name }}" + state: present + fail_mode: standalone - - name: Ensure the infra bridge exists - become: true - openvswitch_bridge: - bridge: "{{ infra_bridge_name }}" - state: present - fail_mode: standalone + - name: Ensure the Neutron external bridge exists + become: true + openvswitch_bridge: + bridge: "{{ neutron_external_bridge_name }}" + state: present + fail_mode: standalone - - name: Ensure the Neutron external bridge exists - become: true - openvswitch_bridge: - bridge: "{{ neutron_external_bridge_name }}" - state: present - fail_mode: standalone - - - name: Create patch port between bridges - become: true - command: >- - ovs-vsctl - --may-exist add-port {{ infra_bridge_name }} - patch-{{ neutron_external_bridge_name }} -- - set interface patch-{{ neutron_external_bridge_name }} - type=patch options:peer=patch-{{ infra_bridge_name }} -- - --may-exist add-port {{ neutron_external_bridge_name }} - patch-{{ infra_bridge_name }} -- - set interface patch-{{ infra_bridge_name }} - type=patch options:peer=patch-{{ neutron_external_bridge_name }} + - name: Create patch port between bridges + become: true + command: >- + ovs-vsctl + --may-exist add-port {{ infra_bridge_name }} + patch-{{ neutron_external_bridge_name }} -- + set interface patch-{{ neutron_external_bridge_name }} + type=patch options:peer=patch-{{ infra_bridge_name }} -- + --may-exist add-port {{ neutron_external_bridge_name }} + patch-{{ infra_bridge_name }} -- + set interface patch-{{ infra_bridge_name }} + type=patch options:peer=patch-{{ neutron_external_bridge_name }}