robertdebock.diskspace
Ansible Role: Disk Space
This role checks how much disk space (or inodes) is available. It will fail if the available space is too low.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
This example comes from molecule/default/converge.yml
and is tested for every update.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.diskspace
diskspace_mounts:
- name: /etc/resolv.conf
megabytes_available: 64
- name: /etc/hostname
gigabytes_available: 4
The system needs to be set up first. In CI, this is done using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
For more information, see this full explanation and example on using the roles.
Role Variables
You can find the default values for variables in defaults/main.yml
:
---
# defaults file for diskspace
# You can specify a list of mount points and their required minimum space.
# diskspace_mounts:
# - name: /
# megabytes_available: 64
# - name: /var
# gigabytes_available: 4
# - name: /home
# inodes_available: 65536
diskspace_mounts: []
Requirements
- Python packages listed in requirements.txt.
State of Used Roles
These roles are used to set up the system, but you can use your own methods.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
Context
This role works with many other compatible roles. For more information, check documentation for these roles.
Here’s a look at related roles:
Compatibility
This role has been tested on these container images:
Container | Tags |
---|---|
Alpine | all |
Amazon | Candidate |
Debian | all |
EL | 9 |
Fedora | all |
Ubuntu | all |
The minimum version of Ansible required is 2.12. Tests have been conducted on the previous version, current version, and development version.
If you find any issues, please report them on GitHub.
License
Author Information
If you would like to support me, please consider sponsoring me.
Check diskspace (or inodes) available, fail if too low.
ansible-galaxy install robertdebock.diskspace