Initial project commit

This commit is contained in:
2024-12-16 19:59:57 -05:00
commit fa1b5cce00
3409 changed files with 460909 additions and 0 deletions

28
lvol-testing2.yml Normal file
View File

@ -0,0 +1,28 @@
---
- name: LVOL Testing
hosts: bigboot
gather_facts: true
vars:
check_vg: system
check_lv: root
check_pv: sda2
tasks:
- name: Run pvdisplay command
ansible.builtin.command: "pvdisplay -m /dev/{{ check_pv }}"
register: pvdisplay_output
- name: Parse pvdisplay output for free extents
ansible.builtin.set_fact:
free_extents: "{{ pvdisplay_output.stdout | regex_findall('Physical extent [0-9]+ to [0-9]+:\\s+FREE') }}"
- name: Parse pvdisplay output for root logical volume extents
ansible.builtin.set_fact:
root_extents: "{{ pvdisplay_output.stdout | regex_findall('Physical extent [0-9]+ to [0-9]+:\\s+Logical volume\\s+/dev/system/root') }}"
- name: Check if root logical volume is broken up by free extents
ansible.builtin.debug:
msg: >
The root logical volume is broken up by free extents:
{{ free_extents | length > 0 and root_extents | length > 1 }}