NTP client/server, prepare slapd

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-04-29 15:12:28 +02:00
parent 7f39ea724a
commit 1115f7d0a8
20 changed files with 411 additions and 1 deletions

View File

@ -0,0 +1,7 @@
---
- name: restart ntpd.service
service:
name: ntpd
state: restarted
become: true

View File

@ -0,0 +1,23 @@
---
- name: Queries package manager for ntp installation
package:
name: ntp
register: pkg_result
retries: 3
until: pkg_result is succeeded
notify: restart ntpd.service
- name: Deploy ntp configuration
template:
src: 'ntp.conf.j2'
dest: '/etc/ntp.conf'
owner: root
group: root
mode: 0644
notify: restart ntpd.service
- name: Enable ntp service
service:
name: ntpd
enabled: yes

View File

@ -0,0 +1,27 @@
{{ ansible_header | comment }}
# Please consider joining the pool:
#
# http://www.pool.ntp.org/join.html
#
# For additional information see:
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - the ntp.conf man page
# Associate to Arch's NTP pool
server charybde.crans.org
server 0.fr.pool.ntp.org
server 1.fr.pool.ntp.org
server 2.fr.pool.ntp.org
server 3.fr.pool.ntp.org
# By default, the server allows:
# - all queries from the local host
# - only time queries from remote hosts, protected by rate limiting and kod
restrict default kod limited nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1
# Location of drift file
driftfile /var/lib/ntp/ntp.drift