diff --git a/test/integration/targets/filesystem/tasks/create_device.yml b/test/integration/targets/filesystem/tasks/create_device.yml index 722565d48f..052934cc54 100644 --- a/test/integration/targets/filesystem/tasks/create_device.yml +++ b/test/integration/targets/filesystem/tasks/create_device.yml @@ -22,6 +22,11 @@ removes: '{{ dev }}' when: fstype == 'lvm' + - name: 'Clean correct device for LVM' + set_fact: + dev: '{{ image_file }}' + when: fstype == 'lvm' + - file: name: '{{ image_file }}' state: absent diff --git a/test/integration/targets/filesystem/tasks/create_fs.yml b/test/integration/targets/filesystem/tasks/create_fs.yml index 3c49d54857..b42f886ef0 100644 --- a/test/integration/targets/filesystem/tasks/create_fs.yml +++ b/test/integration/targets/filesystem/tasks/create_fs.yml @@ -44,7 +44,12 @@ - 'uuid.stdout != uuid3.stdout' - name: increase fake device - shell: 'dd if=/dev/zero bs=1M count=20 >> {{ image_file }}' + shell: 'dd if=/dev/zero bs=1M count=1 >> {{ image_file }}' + +- when: fstype == 'lvm' + block: + - name: Resize loop device for LVM + command: losetup -c {{ dev }} - when: 'grow|bool and (fstype != "vfat" or resize_vfat)' block: