An opinionated ansible role to grow filesystems for linux systems
Role execution requires filters defined in nephelaiio.plugins collection
The main use case for the role is to automatically grow partitions/filesystems on systems installed using nephelaiio.centos_installer and nephelaiio.ubuntu_installer
The role will implement the following disk management logic when applied to a target system: For non-lvm disks:
- Expand last partition when containig device has over 5% available unpartitioned space
- Grow mounted partition filesystems when applicable
For lvm with emtpy disks:
- Grow pvs when applicable
- Partition empty disks and assign device to lvm volume group
- Grow target lvm logical volume
- Optionally create and mount a new lvm logical volume
The role will fail when any of the following conditions are found
- A disk device filter (regex) is not defined
- Volume group is not unique
- Logical volume is not unique and an explicit selection has not been made
The role will exit as a no-op in the following cases:
- No LVM is present and a new disk is found
Please refer to the defaults file for an up to date list of input parameters.
- hosts: servers
roles:
- role: nephelaiio.growfs
Please make sure your environment has docker installed in order to run role validation tests. Additional python dependencies are listed in the requirements file
Role is tested against the following distributions (kvm guests):
- Ubuntu Focal
- Debian 11
You can test the role directly from sources using command molecule test
This project is licensed under the terms of the MIT License