From 2b3a1281ed4f037fbb2ae06da143e8407cabdc11 Mon Sep 17 00:00:00 2001 From: Leo Maroni Date: Sat, 21 Nov 2020 11:04:14 +0100 Subject: [PATCH] Add option to configure timezone Timezone defaults to Europe/Berlin --- defaults/main.yml | 1 + tasks/locale.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 5456e11..a06a427 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,7 @@ users: - { name: 'nouser', state: 'absent', public_key: '' } system_locale: en_US.UTF-8 +system_timezone: "Europe/Berlin" ssh_allow_password: no base_upgrade: yes diff --git a/tasks/locale.yml b/tasks/locale.yml index d053b57..41ab97d 100644 --- a/tasks/locale.yml +++ b/tasks/locale.yml @@ -15,3 +15,7 @@ - name: Configure locale to '{{ system_locale }}' command: localectl set-locale LANG={{ system_locale }} changed_when: locale_lang != system_locale + +- name: Configure Timezone + timezone: + name: "{{ system_timezone }}"