more fix: dont select swap when capturing the adjacent lv
This commit is contained in:
@ -3,19 +3,19 @@
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
set -o pipefail
|
||||
lsblk -p -o name,type | grep -vi swap | grep lvm | head -1
|
||||
lsblk -pl -o name,type,mountpoint | grep -vi swap | grep lvm | head -1 | awk '{ print $1}'
|
||||
executable: /bin/bash
|
||||
changed_when: false
|
||||
register: bigboot_adjacent_lvm
|
||||
|
||||
- name: Set adjacent LVM device name
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_adjacent_lvm_device: "{{ bigboot_adjacent_lvm.stdout | regex_replace('.*(/dev.*)\\s+.*$', '\\1') }}"
|
||||
bigboot_adjacent_lvm_device: "{{ bigboot_adjacent_lvm.stdout }}"
|
||||
|
||||
- name: Get logical volume mount information
|
||||
ansible.builtin.set_fact:
|
||||
bigboot_lv_info: "{{ ansible_facts.mounts \
|
||||
| selectattr('device', 'equalto', bigboot_adjacent_lvm_device | trim) | first }}"
|
||||
| selectattr('device', 'equalto', bigboot_adjacent_lvm_device) | first }}"
|
||||
|
||||
- name: Assert that there is space on the logical volume for shrinkage
|
||||
ansible.builtin.assert:
|
||||
|
Reference in New Issue
Block a user