Skip to content

Commit aad00e6

Browse files
committed
playbooks: ansible-lint fix jinja
Fix jinja ansible-lint rule violations Fixed jinja rule violations across 34 file(s). Affected files include: - playbooks/roles/blktests/tasks/main.yml - playbooks/roles/bootlinux/tasks/install/packages.yml - playbooks/roles/bootlinux/tasks/main.yml - playbooks/roles/build_qemu/tasks/install-deps/main.yml - playbooks/roles/cxl/tasks/main.yml ... and 29 more files Applied using the ansible-lint-fix-rules.py script with --fix=jinja. Generated-by: Ansible Lint (ansible-lint-fix-rules.py) Signed-off-by: Daniel Gomez <[email protected]>
1 parent 5d3f46f commit aad00e6

File tree

34 files changed

+88
-105
lines changed

34 files changed

+88
-105
lines changed

playbooks/roles/blktests/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178

179179
- name: Store last kernel variable
180180
ansible.builtin.set_fact:
181-
last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
181+
last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\", '') }}"
182182
tags: ["blktests", "copy_results", "augment_expunge_list"]
183183
run_once: true
184184

playbooks/roles/bootlinux/tasks/install/packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
- name: Add the core kernel package
2525
ansible.builtin.set_fact:
26-
kernel_packages: "{{ kernel_packages + ['/tmp/' + item.path | basename ] }}"
26+
kernel_packages: "{{ kernel_packages + ['/tmp/' + item.path | basename] }}"
2727
when:
2828
- "'devel' not in item.path"
2929
- "'headers' not in item.path"

playbooks/roles/bootlinux/tasks/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@
111111
- name: Determine active kernel parameters for A/B testing with 9P
112112
ansible.builtin.set_fact:
113113
target_linux_git: "{{ bootlinux_dev_tree if bootlinux_dev_tree != '' else target_linux_git }}"
114-
active_linux_ref: "{{ target_linux_dev_ref if targeting_dev_nodes|default(false)|bool else target_linux_ref }}"
115-
active_linux_kernelrelease: "{{ target_linux_dev_kernelrelease if (targeting_dev_nodes|default(false)|bool and bootlinux_tree_custom_kernelrelease|bool) else
116-
target_linux_kernelrelease }}"
117-
active_linux_localversion: "{{ target_linux_dev_localversion if (targeting_dev_nodes|default(false)|bool and bootlinux_tree_custom_localversion|bool) else target_linux_localversion
118-
}}"
114+
active_linux_ref: "{{ target_linux_dev_ref if targeting_dev_nodes | default(false) | bool else target_linux_ref }}"
115+
active_linux_kernelrelease: "{{ target_linux_dev_kernelrelease if (targeting_dev_nodes | default(false) | bool and bootlinux_tree_custom_kernelrelease | bool)
116+
else target_linux_kernelrelease }}"
117+
active_linux_localversion: "{{ target_linux_dev_localversion if (targeting_dev_nodes | default(false) | bool and bootlinux_tree_custom_localversion | bool) else
118+
target_linux_localversion }}"
119119
target_linux_config: "config-{{ target_linux_dev_ref }}"
120120
when:
121121
- kdevops_baseline_and_dev|bool

playbooks/roles/build_qemu/tasks/install-deps/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ignore_errors: true
55
with_first_found:
66
- files:
7-
- "{{ ansible_facts['os_family']|lower }}.yml"
7+
- "{{ ansible_facts['os_family'] | lower }}.yml"
88
skip: true
99
tags: vars
1010

playbooks/roles/cxl/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
- name: Store last kernel variable
8686
ansible.builtin.set_fact:
87-
last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
87+
last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\", '') }}"
8888
tags: ["ndctl", "cxl-test-prep", "copy_results"]
8989
run_once: true
9090

playbooks/roles/devconfig/tasks/install-deps/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ignore_errors: true
2121
with_first_found:
2222
- files:
23-
- "{{ ansible_facts['os_family']|lower }}.yml"
23+
- "{{ ansible_facts['os_family'] | lower }}.yml"
2424
skip: true
2525
tags: vars
2626

playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,21 @@
109109

110110
- name: Add btrfs-progs to install package list
111111
ansible.builtin.set_fact:
112-
packages: "{{ packages + [ 'btrfs-progs' ] }}"
112+
packages: "{{ packages + ['btrfs-progs'] }}"
113113
when:
114114
- devconfig_try_install_kdevtools|bool
115115
- ansible_distribution == 'Fedora'
116116

117117
- name: Add GNU screen to install package list
118118
ansible.builtin.set_fact:
119-
packages: "{{ packages + [ 'screen' ] }}"
119+
packages: "{{ packages + ['screen'] }}"
120120
when:
121121
- devconfig_try_install_kdevtools|bool
122122
- ansible_facts['os_family']|lower != 'redhat' or ansible_facts['distribution_major_version'] | int < 8
123123

124124
- name: Add Tmux to install package list
125125
ansible.builtin.set_fact:
126-
packages: "{{ packages + [ 'tmux' ] }}"
126+
packages: "{{ packages + ['tmux'] }}"
127127
when:
128128
- devconfig_try_install_kdevtools|bool
129129
- ansible_facts['os_family']|lower == 'redhat' or ansible_facts['distribution_major_version'] | int >= 8

playbooks/roles/devconfig/tasks/kotd-rev-kernel/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
ignore_errors: true
1414
with_first_found:
1515
- files:
16-
- "{{ ansible_facts['os_family']|lower }}.yml"
16+
- "{{ ansible_facts['os_family'] | lower }}.yml"
1717
skip: true
1818
tags: vars
1919

playbooks/roles/devconfig/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@
627627
- name: "Group up facts we'll give to the host"
628628
tags: ["journal_ln"]
629629
ansible.builtin.set_fact:
630-
node_host_ip: "{{ ansible_ssh_host}} {{ ansible_default_ipv4.address }}"
630+
node_host_ip: "{{ ansible_ssh_host }} {{ ansible_default_ipv4.address }}"
631631
delegate_facts: true
632632
when: devconfig_enable_systemd_journal_remote|bool
633633

playbooks/roles/fstests/tasks/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,8 @@
611611
number: "{{ item }}"
612612
state: present
613613
part_type: "logical"
614-
part_start: "{{ ((item - 5) * test_partsize ) + 1 }}GiB"
615-
part_end: "{{ ((item - 4) * test_partsize ) }}GiB"
614+
part_start: "{{ ((item - 5) * test_partsize) + 1 }}GiB"
615+
part_end: "{{ ((item - 4) * test_partsize) }}GiB"
616616
loop: "{{ range(5, 17) | list }}"
617617
when:
618618
- fstests_testdev_nvme_partition_euis|bool
@@ -730,7 +730,7 @@
730730
- name: Set the export volname prefix
731731
tags: vars
732732
ansible.builtin.set_fact:
733-
volname_prefix: "{{ ansible_host|regex_replace(kdevops_host_prefix + '-') }}-fs"
733+
volname_prefix: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') }}-fs"
734734
when:
735735
- fstests_fstyp == "nfs" or fstests_fstyp == "cifs"
736736

@@ -1100,7 +1100,7 @@
11001100

11011101
- name: Store last kernel variable
11021102
ansible.builtin.set_fact:
1103-
last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}"
1103+
last_kernel: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\", '') }}"
11041104
tags: ["oscheck", "fstests", "copy_results", "print_results", "augment_expunge_list"]
11051105
run_once: true
11061106

@@ -1194,7 +1194,7 @@
11941194
chdir: "{{ fstests_data_target }}"
11951195
environment:
11961196
FSTYP: "{{ fstests_fstyp }}"
1197-
FSTESTS_LINUX_LOCALVERSION: "{{ target_linux_localversion | default ('') }}"
1197+
FSTESTS_LINUX_LOCALVERSION: "{{ target_linux_localversion | default('') }}"
11981198
KEEP_DMESG: "yes"
11991199
register: failed_tests_limit
12001200
when:
@@ -1273,11 +1273,11 @@
12731273
FSTYP: "{{ fstests_fstyp }}"
12741274
FSTESTS_SPARSE_FILE_PATH: "{{ sparsefiles_path }}"
12751275
FSTESTS_SETUP_SYSTEM: "{{ fstests_setup_system }}"
1276-
FSTESTS_LINUX_LOCALVERSION: "{{ target_linux_localversion | default ('') }}"
1276+
FSTESTS_LINUX_LOCALVERSION: "{{ target_linux_localversion | default('') }}"
12771277
FSTESTS_TESTDEV_SPARSEFILE_GENERATION: "{{ sparsefiles_generation }}"
12781278
FSTESTS_SPARSE_FILE_SIZE: "{{ sparsefiles_size }}"
12791279
FSTESTS_SPARSE_FILENAME_PREFIX: "{{ sparsefiles_filename_prefix }}"
1280-
FSTESTS_RUN_LARGE_DISK_TESTS: "{{ run_large_disk_tests | default ('') }}"
1280+
FSTESTS_RUN_LARGE_DISK_TESTS: "{{ run_large_disk_tests | default('') }}"
12811281
FSTESTS_RUN_AUTO_GROUP_TESTS: "{{ run_auto_group_tests }}"
12821282
FSTESTS_RUN_CUSTOM_GROUP_TESTS: "{{ run_custom_group_tests }}"
12831283
FSTESTS_EXCLUDE_TEST_GROUPS: "{{ exclude_test_groups }}"

0 commit comments

Comments
 (0)