1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_ntp.git synced 2024-08-16 12:59:49 +02:00
ansible_role_ntp/README.md

88 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

[![Ansible Galaxy](https://ansible.l3d.space/svg/l3d.ntp.svg)](https://galaxy.ansible.com/l3d/ntp)
[![BSD-3 Clause](https://ansible.l3d.space/svg/l3d.ntp_license.svg)](LICENSE)
[![Maintainance](https://ansible.l3d.space/svg/l3d.ntp_maintainance.svg)](https://ansible.l3d.space/#l3d.ntp)
2018-12-28 10:49:24 +01:00
2021-09-27 00:14:59 +02:00
Ansible role ntp
======================
2019-05-17 16:35:30 +02:00
2021-09-27 00:14:59 +02:00
Ansible role to install and configure the Network Time Protocol (NTP) Daemon.
2018-12-28 10:49:24 +01:00
2021-09-27 00:14:59 +02:00
This role was built with support for a variety of operating systems. Including Debian/Ubuntu, RHEL, Suse and Archlinux based Linux versions as well as FreeBSD, Darwin and OpenBSD.
2019-05-17 16:35:30 +02:00
2018-12-28 11:54:06 +01:00
## Role Variables
2018-12-28 10:49:24 +01:00
2021-09-27 00:14:59 +02:00
In addition to the operating system-dependent variables, there are the following default values to adjust:
2018-12-28 10:49:24 +01:00
2018-12-28 11:54:06 +01:00
```yaml
---
# defaults file for ansible-role-ntp
2018-12-28 10:49:24 +01:00
2018-12-28 15:27:57 +01:00
# Restrict acces on ntp server
# Default is: ::1, 127.0.0.1
ntp_restrict:
- default nomodify notrap nopeer noquery
- 127.0.0.1
- ::1
# Ntp server to use for date synchronization
# Default is worldwide pool
ntp_servers:
2021-09-27 00:14:59 +02:00
- ptbtime1.ptb.de
- ptbtime3.ptb.de
2018-12-28 15:27:57 +01:00
- 0.pool.ntp.org iburst
- 1.pool.ntp.org iburst
- 2.pool.ntp.org iburst
- 3.pool.ntp.org iburst
2022-11-17 00:02:19 +01:00
# optionally set timezone
ntp_set_time_zone: false
ntp_timezone: 'Europe/Berlin'
2018-12-28 15:27:57 +01:00
# Enable or disable ntp statistics
ntp_statistics: false
2021-09-27 00:14:59 +02:00
# version check for this playbook (true is recomended)
submodules_versioncheck: false
2018-12-28 11:54:06 +01:00
```
2018-12-28 10:49:24 +01:00
## Example Usage
### Getting this Role
You can install this role using ansible Galaxy:
```bash
ansible-galaxy install l3d.ntp
```
Or download or clone this git repo. Example:
```bash
git clone https://github.com/roles-ansible/ansible_role_ntp.git l3d.ntp
```
### Using this role in a Playbook
```yml
---
- name: Install and Configure NTP
hosts: example.com
roles:
- {role: l3d.ntp, tags: ntp}
vars:
submodules_versioncheck: true
ntp_set_time_zone: true
ntp_timezone: Zulu
# In this example, we enabled optional version check
# and set timezone to Zulu.
```
2018-12-28 11:54:06 +01:00
## Resources
[ntp on ubuntu](https://doc.ubuntu-fr.org/ntp)
## Author Information
+ This role was created in 2018 by diodonfrost.
+ This role was updated and maintained since 2019 by L3D *([DO1JLR](https://github.com/do1jlr))*
+ In 2023 this role moved from ``do1jlr.ntp`` to ``l3d.ntp`` Namespace.
2021-03-19 19:21:29 +01:00
2022-11-17 00:02:19 +01:00
## Contribution
Pleas feel free to open a issue or *(even better)* create a Pull Request if there is a problem or you missing a feature or something like that.