linters: fix spaces between filters
This fixes a number of places where we do not have spaces between filters. I think that this is a reasonable rule for readability (I also think it probably was enforced, but maybe later versions got better at detecting it?). These are detected by a later version of Ansible lint; this change should have no operational change to any roles but prepares us to update in a follow-on change. Change-Id: I07e1a109b87adce86f483d14d7e02fcecb8313d5
This commit is contained in:
parent
f9e38131a7
commit
f76cfbab11
@ -18,8 +18,8 @@
|
||||
- name: Add fileserver to inventory
|
||||
add_host:
|
||||
name: "{{ fileserver.fqdn }}"
|
||||
ansible_user: "{{ fileserver.ssh_username|default(ansible_user) }}"
|
||||
zuul_fileserver_project_path: "{{ fileserver.path }}{{ '/' + fileserver_leading_path if fileserver_leading_path is defined else ''}}/{{ zuul.project.short_name }}"
|
||||
ansible_user: "{{ fileserver.ssh_username | default(ansible_user) }}"
|
||||
zuul_fileserver_project_path: "{{ fileserver.path }}{{ '/' + fileserver_leading_path if fileserver_leading_path is defined else '' }}/{{ zuul.project.short_name }}"
|
||||
|
||||
- name: Add fileserver server to known hosts
|
||||
known_hosts:
|
||||
|
@ -1,4 +1,4 @@
|
||||
---
|
||||
ansible_galaxy_branch: "{{ zuul.branch }}"
|
||||
ansible_galaxy_executable: ansible-galaxy
|
||||
ansible_galaxy_server: "{{ ansible_galaxy_info.server|default('https://galaxy.ansible.com') }}"
|
||||
ansible_galaxy_server: "{{ ansible_galaxy_info.server | default('https://galaxy.ansible.com') }}"
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
- name: Set container filename arg
|
||||
set_fact:
|
||||
containerfile: "{{ zj_image.container_filename|default(container_filename)|default('') }}"
|
||||
containerfile: "{{ zj_image.container_filename | default(container_filename) | default('') }}"
|
||||
|
||||
- name: Build a container image
|
||||
vars:
|
||||
|
@ -1,5 +1,5 @@
|
||||
set_apt_mirrors_trusted: False
|
||||
mirror_fqdn: "{{ zuul_site_mirror_fqdn|default(omit) }}"
|
||||
mirror_fqdn: "{{ zuul_site_mirror_fqdn | default(omit) }}"
|
||||
pypi_fqdn: "{{ mirror_fqdn }}"
|
||||
mirror_use_ssl: False
|
||||
http_or_https: >-
|
||||
|
@ -28,8 +28,8 @@
|
||||
msg: |
|
||||
# Node Information
|
||||
Inventory Hostname: {{ zj_item }}
|
||||
Hostname: {{ hostvars[zj_item]['ansible_hostname']|default('unknown') }}
|
||||
Username: {{ hostvars[zj_item]['ansible_user']|default('unknown') }}
|
||||
Hostname: {{ hostvars[zj_item]['ansible_hostname'] | default('unknown') }}
|
||||
Username: {{ hostvars[zj_item]['ansible_user'] | default('unknown') }}
|
||||
Distro: {{ hostvars[zj_item]['ansible_distribution'] | default('unknown') }} {{ hostvars[zj_item]['ansible_distribution_version'] | default('unknown') }}
|
||||
Provider: {{ hostvars[zj_item]['nodepool']['provider'] }}
|
||||
Label: {{ hostvars[zj_item]['nodepool']['label'] }}
|
||||
|
@ -33,4 +33,4 @@
|
||||
- lxml
|
||||
- requests
|
||||
virtualenv: "{{ ansible_user_dir }}/.venv"
|
||||
extra_args: "{{ upper_constraints|default(omit) }}"
|
||||
extra_args: "{{ upper_constraints | default(omit) }}"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
- name: Install ghc
|
||||
dnf:
|
||||
name: "@ghc:{{ ghc_versions[ghc_version]|string }}"
|
||||
name: "@ghc:{{ ghc_versions[ghc_version] | string }}"
|
||||
state: present
|
||||
become: yes
|
||||
when: "_ghc_version.rc != 0 or (ghc_versions[ghc_version]|string) not in _ghc_version.stdout"
|
||||
when: "_ghc_version.rc != 0 or (ghc_versions[ghc_version] | string) not in _ghc_version.stdout"
|
||||
|
@ -30,7 +30,7 @@
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
virtualenv: "{{ zuul_work_virtualenv }}"
|
||||
requirements: requirements.txt
|
||||
extra_args: "{{ upper_constraints|default(omit) }}"
|
||||
extra_args: "{{ upper_constraints | default(omit) }}"
|
||||
register: requirements_install
|
||||
when:
|
||||
- install_package
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
- name: Install npm dependencies
|
||||
command: npm install --verbose
|
||||
environment: "{{ npm_environment|combine(tox_constraints_env|default({})) }}"
|
||||
environment: "{{ npm_environment | combine(tox_constraints_env | default({})) }}"
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
when: js_build_tool == 'npm'
|
||||
|
@ -1,3 +1,3 @@
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output|default(false) }}"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output | default(false) }}"
|
||||
|
@ -2,7 +2,7 @@
|
||||
zuul_executor_dest: "{{ zuul.executor.log_root }}"
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output|default(false) }}"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output | default(false) }}"
|
||||
sphinx_build_dir: doc/build
|
||||
sphinx_output_suffix: ""
|
||||
sphinx_output_src: "{{ zuul_work_dir }}/{{ sphinx_build_dir }}/html{{ sphinx_output_suffix }}"
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output|default(false) }}"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output | default(false) }}"
|
||||
sphinx_build_dir: doc/build
|
||||
sphinx_pdf_files:
|
||||
- "doc-{{ zuul.project.short_name }}.pdf"
|
||||
|
@ -2,4 +2,4 @@
|
||||
fetch_subunit_output_additional_dirs: []
|
||||
zuul_work_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
||||
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output|default(false) }}"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output | default(false) }}"
|
||||
|
@ -4,4 +4,4 @@ tox_executable: tox
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
|
||||
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output|default(false) }}"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output | default(false) }}"
|
||||
|
@ -2,4 +2,4 @@
|
||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||
translation_output_src: "src/{{ zuul.project.canonical_name }}/translation-source/"
|
||||
zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output|default(false) }}"
|
||||
zuul_use_fetch_output: "{{ zuul_site_use_fetch_output | default(false) }}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
- name: Check to see if the constraints file exists
|
||||
stat:
|
||||
path: "{{ constraints_file|default('missing') }}"
|
||||
path: "{{ constraints_file | default('missing') }}"
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
get_md5: false
|
||||
@ -14,5 +14,5 @@
|
||||
|
||||
- name: Record file location
|
||||
set_fact:
|
||||
upper_constraints: "-c {{ constraints_file|realpath }}"
|
||||
upper_constraints: "-c {{ constraints_file | realpath }}"
|
||||
when: not stat_results is skipped and stat_results.stat.exists
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
- name: Add to current user
|
||||
authorized_key:
|
||||
key: "{{ intercept_key.content|b64decode }}"
|
||||
key: "{{ intercept_key.content | b64decode }}"
|
||||
user: "{{ ansible_user }}"
|
||||
|
||||
- name: Inform user of connection details
|
||||
@ -23,6 +23,6 @@
|
||||
|
||||
- name: Remove key from current user
|
||||
authorized_key:
|
||||
key: "{{ intercept_key.content|b64decode }}"
|
||||
key: "{{ intercept_key.content | b64decode }}"
|
||||
user: "{{ ansible_user }}"
|
||||
state: absent
|
||||
|
@ -8,11 +8,11 @@
|
||||
shell: |
|
||||
set -o pipefail
|
||||
set -e
|
||||
~/.markdownlint/node_modules/.bin/markdownlint {{ zj_markdown|relpath(zuul_work_dir) }} 2>&1 | tee -a markdownlint.txt
|
||||
~/.markdownlint/node_modules/.bin/markdownlint {{ zj_markdown | relpath(zuul_work_dir) }} 2>&1 | tee -a markdownlint.txt
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
executable: /bin/bash
|
||||
loop: "{{ markdown_find.files|map(attribute='path')|list }}"
|
||||
loop: "{{ markdown_find.files | map(attribute='path') | list }}"
|
||||
loop_control:
|
||||
loop_var: zj_markdown
|
||||
changed_when: false
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: Create result dir
|
||||
file:
|
||||
path: "{{ ansible_env.HOME }}/test-results/{{ zj_artifact.url.rstrip('/')|basename }}"
|
||||
path: "{{ ansible_env.HOME }}/test-results/{{ zj_artifact.url.rstrip('/') | basename }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Fetch artifact
|
||||
get_url:
|
||||
url: "{{ zj_artifact.url }}/composite.xml"
|
||||
dest: "{{ ansible_env.HOME }}/test-results/{{ item.url.rstrip('/')|basename }}/composite.xml"
|
||||
dest: "{{ ansible_env.HOME }}/test-results/{{ item.url.rstrip('/') | basename }}/composite.xml"
|
||||
|
@ -42,7 +42,7 @@
|
||||
- name: Set source and destination for files and folders
|
||||
set_fact:
|
||||
source: "{{ zj_result.stat.path }}"
|
||||
dest: "{{ zj_result.zj_source.value.split('_')[0] }}/{{ zj_result.stat.path|basename|regex_replace('^(\\..*)$', '_\\1') }}{% if zj_result.zj_source.value.endswith('_txt') %}.txt{% endif %}"
|
||||
dest: "{{ zj_result.zj_source.value.split('_')[0] }}/{{ zj_result.stat.path | basename | regex_replace('^(\\..*)$', '_\\1') }}{% if zj_result.zj_source.value.endswith('_txt') %}.txt{% endif %}"
|
||||
type: "{{ zj_result.zj_source.value.split('_')[0] }}"
|
||||
with_items: "{{ sources.results }}"
|
||||
loop_control:
|
||||
|
@ -40,7 +40,7 @@
|
||||
- name: Run tox
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
environment: "{{ tox_environment|combine(tox_constraints_env|default({})) }}"
|
||||
environment: "{{ tox_environment | combine(tox_constraints_env | default({})) }}"
|
||||
command: >-
|
||||
{{ tox_executable }}
|
||||
{% if tox_config_file is defined and tox_config_file %}
|
||||
|
@ -12,7 +12,7 @@
|
||||
{{ tox_extra_args }}
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
environment: "{{ tox_environment|combine(tox_constraints_env|default({})) }}"
|
||||
environment: "{{ tox_environment | combine(tox_constraints_env | default({})) }}"
|
||||
|
||||
# This is needed since python < 3.2 can't parse ini files from strings
|
||||
- name: Create a tempfile to save tox showconfig
|
||||
@ -33,7 +33,7 @@
|
||||
> {{ _tox_show_config_tempfile.path }}
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
environment: "{{ tox_environment|combine(tox_constraints_env|default({})) }}"
|
||||
environment: "{{ tox_environment | combine(tox_constraints_env | default({})) }}"
|
||||
|
||||
- name: Install any sibling python packages
|
||||
tox_install_sibling_packages:
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
- name: Add artifact headers
|
||||
set_fact:
|
||||
request_header: "{{ request_header | combine(zj_artifact.headers|default({})) }}"
|
||||
request_header: "{{ request_header | combine(zj_artifact.headers | default({})) }}"
|
||||
|
||||
- name: Add api key to header
|
||||
when: "'api_key' in upload_artifactory_instances[zj_artifact.instance]"
|
||||
@ -70,7 +70,7 @@
|
||||
- name: Set upload url
|
||||
set_fact:
|
||||
_artifactory_upload_url: "\
|
||||
{%- if zj_artifact_properties|length -%}
|
||||
{%- if zj_artifact_properties | length -%}
|
||||
{{ _artifactory_backend_url }};{{ zj_artifact_properties | default('') }}\
|
||||
{%- else -%}
|
||||
{{ _artifactory_backend_url }}\
|
||||
|
@ -1 +1 @@
|
||||
npm_registry_url: "{{ npm_credentials.registry_url|default('//registry.npmjs.org') }}"
|
||||
npm_registry_url: "{{ npm_credentials.registry_url | default('//registry.npmjs.org') }}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
pypi_path: "src/{{ zuul.project.canonical_name }}/dist"
|
||||
pypi_repository: "{{ pypi_info.repository|default('pypi') }}"
|
||||
pypi_repository_url: "{{ pypi_info.repository_url|default(None) }}"
|
||||
pypi_repository: "{{ pypi_info.repository | default('pypi') }}"
|
||||
pypi_repository_url: "{{ pypi_info.repository_url | default(None) }}"
|
||||
pypi_twine_executable: twine
|
||||
pypi_register_first: false
|
||||
|
@ -29,11 +29,11 @@
|
||||
block:
|
||||
- name: Collect information about zuul worker
|
||||
zuul_debug_info:
|
||||
ipv4_route_required: "{{ zuul_site_ipv4_route_required|default(false) }}"
|
||||
ipv6_route_required: "{{ zuul_site_ipv6_route_required|default(false) }}"
|
||||
image_manifest: "{{ zuul_site_image_manifest|default(omit) }}"
|
||||
image_manifest_files: "{{ zuul_site_image_manifest_files|default(omit) }}"
|
||||
traceroute_host: "{{ zuul_site_traceroute_host|default(omit) }}"
|
||||
ipv4_route_required: "{{ zuul_site_ipv4_route_required | default(false) }}"
|
||||
ipv6_route_required: "{{ zuul_site_ipv6_route_required | default(false) }}"
|
||||
image_manifest: "{{ zuul_site_image_manifest | default(omit) }}"
|
||||
image_manifest_files: "{{ zuul_site_image_manifest_files | default(omit) }}"
|
||||
traceroute_host: "{{ zuul_site_traceroute_host | default(omit) }}"
|
||||
register: zdi
|
||||
|
||||
- name: Write out all zuul information for each host
|
||||
|
Loading…
Reference in New Issue
Block a user