ansible-lint: add names to blocks/includes, etc.
This adds names to blocks and includes for consistency. We've done this before (e.g. Ia7e490aaba99da9694a6f3fdb1bca9838221b30a) but I guess 6.12.0 is finding more... Change-Id: Ib451f6d3c5a18047873e63aa0a1aa2b425846fec
This commit is contained in:
parent
7a66a26b77
commit
58a8d1a119
@ -41,7 +41,8 @@
|
|||||||
zuul: "{{ new_zuul }}"
|
zuul: "{{ new_zuul }}"
|
||||||
docker_images: "{{ multiarch | ternary(_arch_docker_images, _normal_docker_images) }}"
|
docker_images: "{{ multiarch | ternary(_arch_docker_images, _normal_docker_images) }}"
|
||||||
|
|
||||||
- include_role:
|
- name: "Upload container image"
|
||||||
|
include_role:
|
||||||
name: "upload-{{ (container_command == 'docker') | ternary('docker', 'container') }}-image"
|
name: "upload-{{ (container_command == 'docker') | ternary('docker', 'container') }}-image"
|
||||||
vars:
|
vars:
|
||||||
zuul: "{{ new_zuul }}"
|
zuul: "{{ new_zuul }}"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# Run ensure-output-dirs now as it is not performed speculatively
|
# Run ensure-output-dirs now as it is not performed speculatively
|
||||||
- import_role:
|
- name: Run ensure-output-dirs
|
||||||
|
import_role:
|
||||||
name: ensure-output-dirs
|
name: ensure-output-dirs
|
||||||
|
|
||||||
- name: Create fake translation
|
- name: Create fake translation
|
||||||
@ -10,10 +11,12 @@
|
|||||||
echo Hello > src/{{ zuul.project.canonical_name }}/translation-source/test
|
echo Hello > src/{{ zuul.project.canonical_name }}/translation-source/test
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- name: Run fetch-translation-output
|
||||||
|
import_role:
|
||||||
name: fetch-translation-output
|
name: fetch-translation-output
|
||||||
|
|
||||||
- import_role:
|
- name: Run fetch-output
|
||||||
|
import_role:
|
||||||
name: fetch-output
|
name: fetch-output
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
|
|
||||||
|
@ -13,21 +13,26 @@
|
|||||||
async: 120
|
async: 120
|
||||||
poll: 0
|
poll: 0
|
||||||
register: touched_file
|
register: touched_file
|
||||||
- async_status:
|
- name: Set async status
|
||||||
|
async_status:
|
||||||
jid: "{{ keygen.ansible_job_id }}"
|
jid: "{{ keygen.ansible_job_id }}"
|
||||||
register: keygen_check
|
register: keygen_check
|
||||||
until: keygen_check.finished == 1
|
until: keygen_check.finished == 1
|
||||||
retries: 2
|
retries: 2
|
||||||
- include_role:
|
- name: Run intercept-job
|
||||||
|
include_role:
|
||||||
name: intercept-job
|
name: intercept-job
|
||||||
- async_status:
|
- name: Set async status
|
||||||
|
async_status:
|
||||||
jid: "{{ touched_file.ansible_job_id }}"
|
jid: "{{ touched_file.ansible_job_id }}"
|
||||||
register: touched_file_check
|
register: touched_file_check
|
||||||
until: touched_file_check.finished == 1
|
until: touched_file_check.finished == 1
|
||||||
retries: 3
|
retries: 3
|
||||||
- stat:
|
- name: Stat job stop
|
||||||
|
stat:
|
||||||
path: "{{ zuul.project.src_dir }}/intercept_job.stop"
|
path: "{{ zuul.project.src_dir }}/intercept_job.stop"
|
||||||
register: stop_waiting
|
register: stop_waiting
|
||||||
- assert:
|
- name: Look for failures
|
||||||
|
assert:
|
||||||
that:
|
that:
|
||||||
- stop_waiting.stat.exists
|
- stop_waiting.stat.exists
|
||||||
|
@ -7,11 +7,13 @@
|
|||||||
args:
|
args:
|
||||||
warn: false
|
warn: false
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- name: Run fetch-javascript-tarball
|
||||||
|
import_role:
|
||||||
name: fetch-javascript-tarball
|
name: fetch-javascript-tarball
|
||||||
vars:
|
vars:
|
||||||
project_ver: master
|
project_ver: master
|
||||||
- import_role:
|
- name: Run fetch-output
|
||||||
|
import_role:
|
||||||
name: fetch-output
|
name: fetch-output
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
post_tasks:
|
post_tasks:
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
roles:
|
roles:
|
||||||
- multi-node-bridge
|
- multi-node-bridge
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- become: yes
|
- name: Check openvswitch
|
||||||
|
become: yes
|
||||||
block:
|
block:
|
||||||
- name: openvswitch should be installed
|
- name: openvswitch should be installed
|
||||||
package:
|
package:
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
- hostvars[item]['nodepool']['public_ipv4']
|
- hostvars[item]['nodepool']['public_ipv4']
|
||||||
|
|
||||||
# ipv6_addresses is set by the multi-node-firewall role
|
# ipv6_addresses is set by the multi-node-firewall role
|
||||||
- when: ipv6_addresses | length > 0
|
- name: check ipv6_addresses
|
||||||
|
when: ipv6_addresses | length > 0
|
||||||
block:
|
block:
|
||||||
- name: switch and peer nodes should be in the ipv6 firewall
|
- name: switch and peer nodes should be in the ipv6 firewall
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -79,7 +79,8 @@
|
|||||||
with_items: "{{ groups['all'] }}"
|
with_items: "{{ groups['all'] }}"
|
||||||
|
|
||||||
# ipv6_addresses is set by the multi-node-firewall role
|
# ipv6_addresses is set by the multi-node-firewall role
|
||||||
- when: ipv6_addresses | length > 0
|
- name: check ipv6_addresses
|
||||||
|
when: ipv6_addresses | length > 0
|
||||||
block:
|
block:
|
||||||
- name: switch and peer nodes should be in the ipv6 firewall
|
- name: switch and peer nodes should be in the ipv6 firewall
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# Run ensure-output-dirs now as it is not performed speculatively
|
# Run ensure-output-dirs now as it is not performed speculatively
|
||||||
- import_role:
|
- name: Run ensure-output-dirs
|
||||||
|
import_role:
|
||||||
name: ensure-output-dirs
|
name: ensure-output-dirs
|
||||||
|
|
||||||
- name: Create fake sphinx output
|
- name: Create fake sphinx output
|
||||||
@ -12,10 +13,12 @@
|
|||||||
warn: false
|
warn: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- name: Run fetch-sphinx-output
|
||||||
|
import_role:
|
||||||
name: fetch-sphinx-output
|
name: fetch-sphinx-output
|
||||||
|
|
||||||
- import_role:
|
- name: Run fetch-output
|
||||||
|
import_role:
|
||||||
name: fetch-output
|
name: fetch-output
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# Run ensure-output-dirs now as it is not performed speculatively
|
# Run ensure-output-dirs now as it is not performed speculatively
|
||||||
- import_role:
|
- name: Run ensure-output-dirs
|
||||||
|
import_role:
|
||||||
name: ensure-output-dirs
|
name: ensure-output-dirs
|
||||||
|
|
||||||
# This simulates the operation of something like "tox -e docs" in
|
# This simulates the operation of something like "tox -e docs" in
|
||||||
@ -33,13 +34,15 @@
|
|||||||
# {{ ansible_user_dir }}/zuul-output/logs/ and extracted into
|
# {{ ansible_user_dir }}/zuul-output/logs/ and extracted into
|
||||||
# zuul-output/logs/<docs|pdf> on the host. They need to be brought back
|
# zuul-output/logs/<docs|pdf> on the host. They need to be brought back
|
||||||
# to the executor using fetch-output
|
# to the executor using fetch-output
|
||||||
- import_role:
|
- name: Run fetch-sphinx-tarball
|
||||||
|
import_role:
|
||||||
name: fetch-sphinx-tarball
|
name: fetch-sphinx-tarball
|
||||||
|
|
||||||
# This copies files from the remote host;
|
# This copies files from the remote host;
|
||||||
# - zuul-output/logs is copied into the zuul.executor.log_root
|
# - zuul-output/logs is copied into the zuul.executor.log_root
|
||||||
# - zuul-output/<artifacts|docs> is copied into zuul.executor.work_root
|
# - zuul-output/<artifacts|docs> is copied into zuul.executor.work_root
|
||||||
- import_role:
|
- name: Run fetch-output
|
||||||
|
import_role:
|
||||||
name: fetch-output
|
name: fetch-output
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# Run ensure-output-dirs now as it is not performed speculatively
|
# Run ensure-output-dirs now as it is not performed speculatively
|
||||||
- import_role:
|
- name: Run ensure-output-dirs
|
||||||
|
import_role:
|
||||||
name: ensure-output-dirs
|
name: ensure-output-dirs
|
||||||
|
|
||||||
- name: Create fake test directory
|
- name: Create fake test directory
|
||||||
@ -48,10 +49,12 @@
|
|||||||
- tox
|
- tox
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- name: Run fetch-subunit-output
|
||||||
|
import_role:
|
||||||
name: fetch-subunit-output
|
name: fetch-subunit-output
|
||||||
|
|
||||||
- import_role:
|
- name: Run fetch-output
|
||||||
|
import_role:
|
||||||
name: fetch-output
|
name: fetch-output
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# Run ensure-output-dirs now as it is not performed speculatively
|
# Run ensure-output-dirs now as it is not performed speculatively
|
||||||
- import_role:
|
- name: Run ensure-output-dirs
|
||||||
|
import_role:
|
||||||
name: ensure-output-dirs
|
name: ensure-output-dirs
|
||||||
|
|
||||||
- name: Simplify tox config
|
- name: Simplify tox config
|
||||||
@ -36,12 +37,14 @@
|
|||||||
- tox
|
- tox
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- name: Run fetch-tox-output
|
||||||
|
import_role:
|
||||||
name: fetch-tox-output
|
name: fetch-tox-output
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: "ALL"
|
tox_envlist: "ALL"
|
||||||
|
|
||||||
- block:
|
- name: Fetch the output
|
||||||
|
block:
|
||||||
- name: Undo the log_path fact set by fetch-javascript-output
|
- name: Undo the log_path fact set by fetch-javascript-output
|
||||||
set_fact:
|
set_fact:
|
||||||
log_path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
|
log_path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
|
||||||
@ -52,7 +55,8 @@
|
|||||||
log_path: "{{ zuul.executor.log_root }}"
|
log_path: "{{ zuul.executor.log_root }}"
|
||||||
when: groups['all'] | length == 1
|
when: groups['all'] | length == 1
|
||||||
|
|
||||||
- import_role:
|
- name: Run fetch-output
|
||||||
|
import_role:
|
||||||
name: fetch-output
|
name: fetch-output
|
||||||
when: zuul_use_fetch_output
|
when: zuul_use_fetch_output
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@
|
|||||||
tempfile:
|
tempfile:
|
||||||
register: default_tempfile
|
register: default_tempfile
|
||||||
|
|
||||||
- block:
|
- name: Run tox
|
||||||
|
block:
|
||||||
- name: Run tox with empty envlist
|
- name: Run tox with empty envlist
|
||||||
include_role:
|
include_role:
|
||||||
name: tox
|
name: tox
|
||||||
@ -51,7 +52,8 @@
|
|||||||
state: absent
|
state: absent
|
||||||
path: "{{ default_tempfile.path }}"
|
path: "{{ default_tempfile.path }}"
|
||||||
|
|
||||||
- block:
|
- name: Check testenvs output
|
||||||
|
block:
|
||||||
- name: Create tempfile to verify testenvs ran
|
- name: Create tempfile to verify testenvs ran
|
||||||
tempfile:
|
tempfile:
|
||||||
register: ALL_tempfile
|
register: ALL_tempfile
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- include_role:
|
- name: Run ensure-rust
|
||||||
|
include_role:
|
||||||
name: ensure-rust
|
name: ensure-rust
|
||||||
|
|
||||||
- name: Test cargo run
|
- name: Test cargo run
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- include_role:
|
- name: Run update-json-file
|
||||||
|
include_role:
|
||||||
name: update-json-file
|
name: update-json-file
|
||||||
vars:
|
vars:
|
||||||
update_json_file_name: some/test.json
|
update_json_file_name: some/test.json
|
||||||
@ -11,7 +12,8 @@
|
|||||||
moo: boo
|
moo: boo
|
||||||
update_json_file_debug: true
|
update_json_file_debug: true
|
||||||
|
|
||||||
- include_role:
|
- name: Run update-json-file again
|
||||||
|
include_role:
|
||||||
name: update-json-file
|
name: update-json-file
|
||||||
vars:
|
vars:
|
||||||
update_json_file_name: some/test.json
|
update_json_file_name: some/test.json
|
||||||
@ -32,7 +34,8 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
_config: "{{ _file.content | b64decode | from_json }}"
|
_config: "{{ _file.content | b64decode | from_json }}"
|
||||||
|
|
||||||
- assert:
|
- name: Check output
|
||||||
|
assert:
|
||||||
that:
|
that:
|
||||||
- _config['foo'] == 'bar'
|
- _config['foo'] == 'bar'
|
||||||
- _config['moo'] == 'boo'
|
- _config['moo'] == 'boo'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user