buluma.common

Ansible 角色 common

此角色的目的是配置您系统中的常见设置。

GitHub 版本 问题 拉取请求 下载
github 版本 问题 拉取请求 Ansible 角色

示例剧本

该示例来自molecule/default/converge.yml,会在每次推送、拉取请求和发布时进行测试。

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: buluma.common

需要准备好机器。在 CI 中,这可以使用molecule/default/prepare.yml完成:

---
- name: Prepare
  hosts: all
  gather_facts: false
  become: true

  roles:
    - role: buluma.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

要求

使用的角色状态

以下角色用于准备系统。您也可以通过其他方式准备系统。

要求 GitHub 版本
buluma.bootstrap Ansible Molecule 版本

背景

此角色是许多兼容角色的一部分。有关更多信息,请查看这些角色的文档

以下是相关角色的概述:

依赖关系

兼容性

此角色已在以下容器镜像上进行测试:

容器 标签
Alpine 全部
Amazon 全部
Debian 全部
Fedora 全部
opensuse 全部
Ubuntu 全部

所需的最低 Ansible 版本为 2.12,测试已在以下版本中完成:

  • 上一个版本。
  • 当前版本。
  • 开发版本。

如果您发现问题,请在GitHub上登记。

变更日志

角色历史

许可证

Apache-2.0

作者信息

Shadow Walker

关于项目

The purpose of this role is to configure common things on your system.

安装
ansible-galaxy install buluma.common
许可证
apache-2.0
下载
90.1k
拥有者
DevOps Engineer