From a82425b10738c9119075c2347e258d5048530f1d Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sun, 21 Sep 2025 17:17:08 +0200 Subject: Clean up bootmgr and fix systemd-boot regression issue Also update the syntax to use the new loop syntax instead of with_items --- roles/partition/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/partition') diff --git a/roles/partition/tasks/main.yml b/roles/partition/tasks/main.yml index a52f5c0..e044578 100644 --- a/roles/partition/tasks/main.yml +++ b/roles/partition/tasks/main.yml @@ -37,7 +37,7 @@ # Ensure the /mnt/path is unmounted before /mnt (respect mount tree) # This ensures not getting error device is busy when unmounting # Ignore partitions without mount_path - with_items: "{{ + loop: "{{ partition_list | rejectattr('mount_path', 'undefined') | sort(attribute='mount_path') @@ -54,7 +54,7 @@ part_start: "{{ item.part_start }}" part_end: "{{ item.part_end }}" state: "present" - with_items: "{{ partition_list }}" + loop: "{{ partition_list }}" - name: "Create filesystem on device: {{ partition_disk }}" community.general.filesystem: @@ -65,7 +65,7 @@ # For any other partition, only create the filesystem if partition_wipe is true # This is done to ensure that new install a distro won't affect other already installed systems. force: "{{ (item.name in [partition_swap.name, partition_root.name]) | ternary(true, partition_wipe) }}" - with_items: "{{ partition_list }}" + loop: "{{ partition_list }}" - name: "Run mkswap" ansible.builtin.command: @@ -91,7 +91,7 @@ # Ignore mounting swap partition as it's mounted using swapon # Ignore partitions without mount_path # Ensure the /mnt is mounted before /mnt/path (respect mount tree) - with_items: "{{ + loop: "{{ partition_list | difference([partition_swap]) | rejectattr('mount_path', 'undefined') -- cgit v1.2.3