update file for adding lab

This commit is contained in:
Olivier Barais
2022-12-12 08:29:26 +01:00
parent 4cf2d220e1
commit 2f100754bb
25 changed files with 90 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
---
# Handler to handle common notifications. Handlers are called by other plays.
# See http://docs.ansible.com/playbooks_intro.html for more information about handlers.
- name: restart ntp
service:
name: ntp
state: restarted

View File

@@ -0,0 +1,23 @@
---
# This playbook contains common plays that will be run on all nodes.
- name: Install ntp
apt:
name: ntp
update_cache: true
state: present
tags: ntp
- name: Configure ntp file
template:
src: ntp.conf.j2
dest: /etc/ntp.conf
tags: ntp
notify: restart ntp
- name: Start the ntp service
service:
name: ntp
state: started
enabled: yes
tags: ntp

View File

@@ -0,0 +1,12 @@
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
server {{ ntpserver }}
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys