robertdebock.common
Ansible 角色 common
这个角色的目的是配置系统中的常见设置。
| GitHub | GitLab | 下载 | 版本 |
|---|---|---|---|
示例剧本
这个示例来源于 molecule/default/converge.yml,在每次推送、拉取请求和发布时进行测试。
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.common
需要准备机器。在CI中,这通过 molecule/default/prepare.yml 完成:
---
- name: Prepare
hosts: all
gather_facts: false
become: true
roles:
- role: robertdebock.bootstrap
另请参见 完整说明和示例 了解如何使用这些角色。
角色变量
变量的默认值设置在 defaults/main.yml 中:
---
# common的默认文件
# 选择的主机名。
common_hostname: "{{ inventory_hostname }}"
# 要配置的名称服务器列表。
# common_nameservers:
# - 1.1.1.1
# - 1.0.0.1
# 用于填写/etc/hosts的所有主机。
common_hosts: "{{ groups.all }}"
# 您是否希望在主机名更改时重启?
common_reboot: true
需求
- requirements.txt 中列出的pip包。
使用的角色状态
以下角色用于准备系统。您可以以其他方式准备系统。
| 需求 | GitHub | GitLab |
|---|---|---|
| robertdebock.bootstrap |
上下文
这个角色是许多兼容角色的一部分。有关更多信息,请查看 这些角色的文档。
以下是相关角色的概述:

兼容性
这个角色已在以下 容器镜像 上进行了测试:
| 容器 | 标签 |
|---|---|
| Alpine | 所有 |
| Amazon | 候选 |
| EL | 9 |
| Debian | 所有 |
| Fedora | 所有 |
| Ubuntu | 所有 |
最低要求的Ansible版本为2.12,已进行了以下测试:
- 之前的版本。
- 当前版本。
- 开发版本。
如果您发现问题,请在 GitHub 上提交。
许可证
作者信息
请考虑 赞助我。
关于项目
The purpose of this role is to configure common things on your system.
安装
ansible-galaxy install robertdebock.common许可证
apache-2.0
下载
35.6k
拥有者
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.
