project: fix var-spacing ansible rule (#10266)

* project: fix var-spacing ansible rule

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix spacing on the beginning/end of jinja template

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix spacing of default filter

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix spacing between filter arguments

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix double space at beginning/end of jinja

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* project: fix remaining jinja[spacing] ansible-lint warning

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
This commit is contained in:
Arthur Outhenin-Chalandre
2023-07-05 05:36:54 +02:00
committed by GitHub
parent f8b93fa88a
commit 5d00b851ce
178 changed files with 767 additions and 733 deletions

View File

@@ -14,10 +14,11 @@
- name: replace_test_id
set_fact:
test_name: "{{ test_id |regex_replace('\\.', '-') }}"
test_name: "{{ test_id | regex_replace('\\.', '-') }}"
- name: set instance names
set_fact:
# noqa: jinja[spacing]
instance_names: >-
{%- if mode in ['separate', 'separate-scale', 'ha', 'ha-scale'] -%}
k8s-{{ test_name }}-1,k8s-{{ test_name }}-2,k8s-{{ test_name }}-3
@@ -39,7 +40,7 @@
credentials_file: "{{ gce_credentials_file | default(omit) }}"
project_id: "{{ gce_project_id }}"
zone: "{{ cloud_region }}"
metadata: '{"test_id": "{{ test_id }}", "network": "{{ kube_network_plugin }}", "startup-script": "{{ startup_script|default("") }}"}'
metadata: '{"test_id": "{{ test_id }}", "network": "{{ kube_network_plugin }}", "startup-script": "{{ startup_script | default("") }}"}'
tags: "build-{{ test_name }},{{ kube_network_plugin }}"
ip_forward: yes
service_account_permissions: ['compute-rw']
@@ -59,7 +60,7 @@
- name: Make group_vars directory
file:
path: "{{ inventory_path|dirname }}/group_vars"
path: "{{ inventory_path | dirname }}/group_vars"
state: directory
mode: 0755
when: mode in ['scale', 'separate-scale', 'ha-scale']
@@ -67,13 +68,13 @@
- name: Template fake hosts group vars # noqa no-relative-paths - CI templates are not in role_path
template:
src: ../templates/fake_hosts.yml.j2
dest: "{{ inventory_path|dirname }}/group_vars/fake_hosts.yml"
dest: "{{ inventory_path | dirname }}/group_vars/fake_hosts.yml"
mode: 0644
when: mode in ['scale', 'separate-scale', 'ha-scale']
- name: Delete group_vars directory
file:
path: "{{ inventory_path|dirname }}/group_vars"
path: "{{ inventory_path | dirname }}/group_vars"
state: absent
recurse: yes
when: delete_group_vars