Simplify disks.yml
This commit is contained in:
parent
a65f92c8c4
commit
57abbccb04
|
@ -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'"
|
||||
|
|
Reference in a new issue