From 8aa21294ff127edf2fc86502eb11dfb4a96c3cd2 Mon Sep 17 00:00:00 2001
From: Freezed <2160318-free_zed@users.noreply.gitlab.com>
Date: Sat, 12 Mar 2022 18:44:49 +0100
Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Add=20timezone=20config=20&=20cl?=
 =?UTF-8?q?ock=20update?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Makefile                 | 2 +-
 inventory.sample         | 6 ++++++
 tasks/system_cfg/ntp.yml | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 009c415..7413eaf 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ clean:
 	find . -type f -name "*.orig" -delete
 
 open_all:
-	${EDITOR} .gitignore inventory Makefile README.md
+	${EDITOR} .gitignore inv* Makefile README.md
 	${EDITOR} tasks/*.yml
 	${EDITOR} tasks/files/sshd_config
 	${EDITOR} tasks/system_cfg/*.yml
diff --git a/inventory.sample b/inventory.sample
index 267a16a..1190cb6 100644
--- a/inventory.sample
+++ b/inventory.sample
@@ -14,3 +14,9 @@
 localhost
 192.168.1.11
 192.168.1.22
+
+[server:vars]
+timezone="UTC"
+
+[workstation:vars]
+timezone="Europe/Paris"
diff --git a/tasks/system_cfg/ntp.yml b/tasks/system_cfg/ntp.yml
index fad4dc7..01d9b38 100644
--- a/tasks/system_cfg/ntp.yml
+++ b/tasks/system_cfg/ntp.yml
@@ -3,6 +3,10 @@
 - name: NTP | INCLUDE_VARS
   ansible.builtin.include_vars: "vars.yml"
 
+- name: "NTP | set timezone to {{ timezone }}"
+  community.general.timezone:
+    name: "{{ timezone }}"
+
 - name: NTP | install NTP daemon
   ansible.builtin.apt:
     pkg: openntpd
-- 
GitLab