initial changes and cleanup prior to service management code

This commit is contained in:
2024-07-10 19:45:25 -04:00
parent 4b15e3396b
commit 25c7c4a19e
8 changed files with 127 additions and 12 deletions

View File

@ -0,0 +1,37 @@
---
- name: Capture boot and logical volume information
hosts: all
become: true
gather_facts: true
strategy: free
vars:
shrink_lv_device: "/dev/mapper/system-root"
tasks:
- name: Get the mount point info
ansible.builtin.set_fact:
shrink_lv_mount_info: "{{ ansible_facts.mounts | selectattr('device', 'equalto', shrink_lv_device) }}"
- name: Assert that the mount point exists
ansible.builtin.assert:
that: (shrink_lv_mount_info | length) == 1
fail_msg: "Mount point {{ shrink_lv_device }} does not exist"
- name: Get logical volume mount information
ansible.builtin.set_fact:
bigboot_lv_info: "{{ ansible_facts.mounts \
| selectattr('device', 'equalto', shrink_lv_device) }}"
- name: Assert that the mount point exists
ansible.builtin.assert:
that: (bigboot_lv_info | length) == 1
fail_msg: "Mount point {{ shrink_lv_device }} does not exist"
- name: Debug shrink_lv_mount_info
ansible.builtin.debug:
var: shrink_lv_mount_info
- name: Debug bigboot_lv_info
ansible.builtin.debug:
var: bigboot_lv_info