homeserver/Archiv/mgrote.ntp/tasks/main.yml
mg e37d354f2c ntp --> chrony (#28)
ntp-rolle in archiv

syntax when richtig

typo

on+off playbook

Doku

vars

doku server

doku

firewall

server an

client aktualisiert

playbook server

playbook base mit ausnahme

server in inventory

ntp_server ohne server geht

rollen angelegt

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#28
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
2021-03-13 12:32:54 +01:00

38 lines
786 B
YAML

---
- name: mask systemd-timesyncd
become: yes
systemd:
name: systemd-timesyncd
state: stopped
masked: yes
- name: install ntp packages
become: yes
ansible.builtin.package:
name:
- ntp
- ntpdate
state: present
- name: Create ntp driftfile folder
become: yes
file:
state: directory
path: "{{ ntp_driftfile_directory }}"
mode: 0644
owner: "{{ ntp_daemon_user }}"
group: "{{ ntp_daemon_group }}"
- name: create ntp.conf
become: yes
template:
src: "ntp.conf.j2"
dest: "/etc/ntp.conf"
mode: 0644
notify:
- restart ntpd
- name: set timezone to {{ ntp_timezone }}
become: yes
ansible.builtin.timezone:
name: "{{ ntp_timezone }}"