robertdebock.maintenance
Ansible角色维护
通过清理来维护您的系统。
| GitHub | GitLab | 下载 | 版本 |
|---|---|---|---|
示例剧本
这个示例取自molecule/default/converge.yml,并在每次推送、拉取请求和发布时进行测试。
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.maintenance
maintenance_files_to_empty:
- /tmp/some_file.txt
机器需要准备好。在持续集成中,这通过molecule/default/prepare.yml完成:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
tasks:
- name: 创建一个文件
ansible.builtin.copy:
dest: /tmp/some_file.txt
content: "一些内容"
mode: "0644"
有关如何使用这些角色的完整说明和示例。
角色变量
变量的默认值在defaults/main.yml中设置:
---
# 维护的默认值文件
maintenance_journalctl_vacuum: 10d
# 需要清空的文件列表。
# maintenance_files_to_empty:
# - /tmp/some_file.txt
要求
- 列在requirements.txt中的pip包。
使用的角色状态
以下角色用于准备系统。您可以以其他方式准备系统。
| 要求 | GitHub | GitLab |
|---|---|---|
| robertdebock.bootstrap |
上下文
这个角色是多个兼容角色的一部分。有关更多信息,请查看这些角色的文档。
这是相关角色的概述:

兼容性
该角色已在这些容器镜像上进行了测试:
| 容器 | 标签 |
|---|---|
| Alpine | 所有 |
| Amazon | 候选 |
| EL | 9 |
| Debian | 所有 |
| Fedora | 所有 |
| Ubuntu | 所有 |
所需的最低Ansible版本为2.12,已测试:
- 前一个版本。
- 当前版本。
- 开发版本。
如果您发现问题,请在GitHub上注册。
许可证
作者信息
请考虑赞助我。
安装
ansible-galaxy install robertdebock.maintenance许可证
apache-2.0
下载
9.3k
拥有者
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.
