robertdebock.maintenance
Ansible Role Maintenance
Keep your system clean and well-maintained.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here’s a simple example from molecule/default/converge.yml
, tested with each update.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.maintenance
maintenance_files_to_empty:
- /tmp/some_file.txt
First, prepare your system. In Continuous Integration (CI), this uses molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
tasks:
- name: Create a file
ansible.builtin.copy:
dest: /tmp/some_file.txt
content: "Some content"
mode: "0644"
For more details, check the full guide and examples.
Role Variables
Default values for variables are found in defaults/main.yml
:
---
# default settings for maintenance
maintenance_journalctl_vacuum: 10d
# List of files that need to be emptied.
# maintenance_files_to_empty:
# - /tmp/some_file.txt
Requirements
- Python packages listed in requirements.txt.
State of Used Roles
These roles help get your system ready. You can also prepare it in other ways.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
Context
This role works with many other compatible roles. For more information, check the documentation for these roles.
Here’s a visual of related roles:
Compatibility
This role has been tested on various container images:
Container | Tags |
---|---|
Alpine | all |
Amazon | Candidate |
EL | 9 |
Debian | all |
Fedora | all |
Ubuntu | all |
Ansible version required is 2.12. Tests have been performed for:
- The previous version.
- The current version.
- The development version.
If you find any issues, please report them on GitHub.
License
Author Information
Please consider sponsoring me.
ansible-galaxy install robertdebock.maintenance