buluma.ntp
Ansible角色 ntp
在你的系统上安装和配置NTP。
GitHub | 版本 | 问题 | 拉取请求 | 下载 |
---|---|---|---|---|
示例剧本
这个示例来自 molecule/default/converge.yml
,在每次推送、拉取请求和发布时进行测试。
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: buluma.cron
- role: buluma.ntp
ntp_state: stopped
需要准备机器。在持续集成中,这是通过 molecule/default/prepare.yml
实现的:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: buluma.bootstrap
还可以参见 完整的解释和示例 以了解如何使用这些角色。
角色变量
变量的默认值在 defaults/main.yml
中设置:
---
# ntp的默认文件
# NTP服务的状态。
ntp_state: started
# 启动时NTP服务的状态。
ntp_enabled: true
# 要监听的IP地址列表。
ntp_interfaces:
- address: "127.0.0.1"
# NTP池及其选项列表。
ntp_pool:
- name: "0.pool.ntp.org iburst"
- name: "1.pool.ntp.org iburst"
- name: "2.pool.ntp.org iburst"
- name: "3.pool.ntp.org iburst"
# NTP服务器及其选项列表。
# ntp_server:
# - name: ntp.example.com
# options:
# - iburst
# 时区。
ntp_timezone: Etc/UTC
需求
- requirements.txt 中列出的 pip 包。
所用角色状态
以下角色用于准备系统。你可以用另一种方式准备你的系统。
需求 | GitHub | 版本 |
---|---|---|
buluma.bootstrap | ||
buluma.cron |
上下文
这个角色是许多兼容角色的一部分。你可以查看 这些角色的文档 获取更多信息。
以下是相关角色的概述:
兼容性
该角色已在以下 容器镜像 上进行了测试:
容器 | 标签 |
---|---|
Amazon | 候选 |
EL | 8 |
Debian | 全部 |
Fedora | 全部 |
Ubuntu | 全部 |
所需的最低 Ansible 版本为 2.12,已进行了以下测试:
- 之前的版本。
- 当前版本。
- 开发版本。
如果你发现问题,请在 GitHub 上提交。