diff --git a/defaults/main.yml b/defaults/main.yml index 823d714..fb3e695 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,4 +6,7 @@ arch_base_timezone: Europe/Paris arch_base_locales: [ "fr_FR.UTF-8", "en_US.UTF-8" -] \ No newline at end of file +] +time: + hwclock: UTC + timezone: Europe/Paris \ No newline at end of file diff --git a/tasks/time.yml b/tasks/time.yml index 7ff4e0b..d9da526 100644 --- a/tasks/time.yml +++ b/tasks/time.yml @@ -3,4 +3,10 @@ command: timedatectl set-ntp true become: yes args: - creates: /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service \ No newline at end of file + creates: /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service + +- name: Set timezone and hardware clock + timezone: + hwclock: '{{ time.hwclock }}' + name: '{{ time.timezone }}' + become: yes \ No newline at end of file