homeserver/roles/mgrote.ntp/tasks/main.yml
mg bb30425c44 Verbesserungen aus dem ansible-workshop2 (#24)
gitea. version bump

Bugfix: apt_manage_sources: pve add Repo-Key

apt_manage_sources: typo

motd: Doku

ntp: Doku

dokuwiki: Doku

sanoid: Doku

sanoid: rsync entfernt

motd: Doku

motd: Todo entfernt

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#24
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
2021-03-10 14:50: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 }}"