Skip to content

nephelaiio/ansible-role-growfs

Repository files navigation

nephelaiio.growfs

Build Status Ansible Galaxy

An opinionated ansible role to grow filesystems for linux systems

Dependencies

Role execution requires filters defined in nephelaiio.plugins collection

Use case

The main use case for the role is to automatically grow partitions/filesystems on systems installed using nephelaiio.centos_installer and nephelaiio.ubuntu_installer

Logic

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

Role Variables

Please refer to the defaults file for an up to date list of input parameters.

Example Playbook

- hosts: servers
  roles:
     - role: nephelaiio.growfs

Testing

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

License

This project is licensed under the terms of the MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published