Merge "Cleanup remaining Ansible lint warnings"

This commit is contained in:
Zuul 2024-09-23 21:29:50 +00:00 committed by Gerrit Code Review
commit e971613316
7 changed files with 15 additions and 10 deletions

View File

@ -7,6 +7,7 @@
- name: Add apt keys - name: Add apt keys
become: true become: true
# noqa args[module] We're deciding at runtime which exclusive argument to pass
apt_key: apt_key:
url: "{{ zj_item['url'] | default(omit) }}" url: "{{ zj_item['url'] | default(omit) }}"
data: "{{ zj_item['data'] | default(omit) }}" data: "{{ zj_item['data'] | default(omit) }}"

View File

@ -42,7 +42,7 @@
stestr run --test-path subunit_tests {{ item.value.test_pattern }} stestr run --test-path subunit_tests {{ item.value.test_pattern }}
args: args:
chdir: "{{ item.value.directory }}" chdir: "{{ item.value.directory }}"
ignore_errors: yes failed_when: false
loop: "{{ tests_data|dict2items }}" loop: "{{ tests_data|dict2items }}"
roles: roles:
- role: fetch-subunit-output - role: fetch-subunit-output

View File

@ -42,7 +42,7 @@
stestr run --test-path subunit_tests {{ item.value.test_pattern }} stestr run --test-path subunit_tests {{ item.value.test_pattern }}
args: args:
chdir: "{{ item.value.directory }}" chdir: "{{ item.value.directory }}"
ignore_errors: yes failed_when: false
loop: "{{ tests_data|dict2items }}" loop: "{{ tests_data|dict2items }}"
roles: roles:
- role: fetch-subunit-output - role: fetch-subunit-output

View File

@ -3,7 +3,7 @@
- name: Create a python-version file with a python version in it - name: Create a python-version file with a python version in it
delegate_to: localhost delegate_to: localhost
copy: copy:
content: 3.11 content: "3.11"
dest: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/.python-version" dest: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/.python-version"
- name: Include ensure-python role - name: Include ensure-python role

View File

@ -14,6 +14,8 @@
poll: 0 poll: 0
register: touched_file register: touched_file
- name: Set async status - name: Set async status
# noqa args[module] see this bug
# https://github.com/ansible/ansible-lint/issues/2824
async_status: async_status:
jid: "{{ keygen.ansible_job_id }}" jid: "{{ keygen.ansible_job_id }}"
register: keygen_check register: keygen_check
@ -23,6 +25,8 @@
include_role: include_role:
name: intercept-job name: intercept-job
- name: Set async status - name: Set async status
# noqa args[module] see this bug
# https://github.com/ansible/ansible-lint/issues/2824
async_status: async_status:
jid: "{{ touched_file.ansible_job_id }}" jid: "{{ touched_file.ansible_job_id }}"
register: touched_file_check register: touched_file_check

View File

@ -60,7 +60,7 @@
block: block:
- name: Create tempfile to verify testenvs ran - name: Create tempfile to verify testenvs ran
tempfile: tempfile:
register: ALL_tempfile register: all_tempfile
- name: Run tox with ALL - name: Run tox with ALL
include_role: include_role:
@ -68,7 +68,7 @@
vars: vars:
zuul_work_dir: "{{ zuul.project.src_dir }}/test-playbooks/python/" zuul_work_dir: "{{ zuul.project.src_dir }}/test-playbooks/python/"
tox_install_siblings: false tox_install_siblings: false
tox_extra_args: "-- {{ ALL_tempfile.path }}" tox_extra_args: "-- {{ all_tempfile.path }}"
tox_envlist: 'ALL' tox_envlist: 'ALL'
always: always:
- name: Make sure magic lines are present - name: Make sure magic lines are present
@ -76,11 +76,11 @@
- linters - linters
- non-default - non-default
lineinfile: lineinfile:
path: "{{ ALL_tempfile.path }}" path: "{{ all_tempfile.path }}"
line: "{{ item }}" line: "{{ item }}"
check_mode: true check_mode: true
register: ALL_status register: all_status
failed_when: ALL_status is changed failed_when: all_status is changed
- name: Move test-playbooks/python/tox.ini to test-playbooks/python/foo.ini - name: Move test-playbooks/python/tox.ini to test-playbooks/python/foo.ini
# Tox 4 appears to have trouble when there is a tox.ini in the current # Tox 4 appears to have trouble when there is a tox.ini in the current

View File

@ -13,7 +13,7 @@
failed_when: no failed_when: no
- name: Describe dockertest pod - name: Describe dockertest pod
command: kubectl describe pod/quaytest command: kubectl describe pod/quaytest
ignore_errors: true failed_when: false
- name: Describe upstream-dockertest pod - name: Describe upstream-dockertest pod
command: kubectl describe pod/upstream-dockertest command: kubectl describe pod/upstream-dockertest
ignore_errors: true failed_when: false