diff --git a/roles/os_config/tasks/disks.yml b/roles/os_config/tasks/disks.yml index d19ebb7..14e0f7d 100644 --- a/roles/os_config/tasks/disks.yml +++ b/roles/os_config/tasks/disks.yml @@ -25,7 +25,7 @@ loop: - "/dev/mapper/{{ hdd_name }}" - "/dev/mapper/{{ ssd_name }}" - when: mounted_devices.stdout_lines | select('search', item) | list | length == 0 + when: mounted_devices.stdout | regex_search(item) is none - name: Mount filesystems mount: @@ -39,7 +39,7 @@ path: "{{ hdd_mount_point }}" - dev: "/dev/mapper/{{ ssd_name }}" path: "{{ ssd_mount_point }}" - when: mounted_devices.stdout_lines | select('search', item.dev) | list | length == 0 + when: mounted_devices.stdout | regex_search(item.dev) is none - name: Check if swapfile is mounted shell: "swapon | grep -q '{{ ssd_mount_point }}/swapfile'"