refactor: add loop_control labels to dict-based loops across all roles

This commit is contained in:
2026-02-20 23:00:53 +01:00
parent a63ffbc731
commit 041650c287
13 changed files with 41 additions and 0 deletions

View File

@@ -77,3 +77,4 @@
- { regexp: "^tmpfs\\s+/dev/shm\\s+", line: "tmpfs /dev/shm tmpfs defaults,nosuid,nodev,noexec 0 0" }
loop_control:
loop_var: fstab_entry
label: "{{ fstab_entry.regexp }}"

View File

@@ -10,6 +10,8 @@
line: GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
- regexp: ^GRUB_TIMEOUT=
line: GRUB_TIMEOUT=1
loop_control:
label: "{{ item.line }}"
- name: Ensure grub defaults file exists for RHEL-based systems
when: is_rhel | bool

View File

@@ -21,6 +21,8 @@
line: "{{ item.line }}"
loop:
- { regex: "{{ system_cfg.locale }} UTF-8", line: "{{ system_cfg.locale }} UTF-8" }
loop_control:
label: "{{ item.line }}"
- name: Generate locales
when: not is_rhel | bool

View File

@@ -43,6 +43,8 @@
dest: "/mnt/etc/runlevels/default/{{ item.item }}"
state: link
loop: "{{ configuration_openrc_service_stats.results }}"
loop_control:
label: "{{ item.item }}"
when: item.stat.exists
- name: Enable runit services
@@ -73,4 +75,6 @@
dest: "/mnt/var/service/{{ item.item }}"
state: link
loop: "{{ configuration_runit_service_stats.results }}"
loop_control:
label: "{{ item.item }}"
when: item.stat.exists