From 9f4118cadc30a0a1e58b0205df22af2e8a870b5b Mon Sep 17 00:00:00 2001 From: mafyuh Date: Thu, 23 May 2024 03:43:48 +0000 Subject: [PATCH] Add timezone.yml --- timezone.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 timezone.yml diff --git a/timezone.yml b/timezone.yml new file mode 100644 index 0000000..57fc94e --- /dev/null +++ b/timezone.yml @@ -0,0 +1,19 @@ +- name: Set timezone and configure timesyncd + hosts: "*" + become: yes + tasks: + - name: set timezone + shell: timedatectl set-timezone America/New_York + + - name: Make sure timesyncd is stopped + systemd: + name: systemd-timesyncd.service + state: stopped + + - name: Copy over the timesyncd config + template: src=../templates/timesyncd.conf dest=/etc/systemd/timesyncd.conf + + - name: Make sure timesyncd is started + systemd: + name: systemd-timesyncd.service + state: started \ No newline at end of file