summaryrefslogtreecommitdiff
path: root/roles/core/base
diff options
context:
space:
mode:
Diffstat (limited to 'roles/core/base')
-rw-r--r--roles/core/base/tasks/Debian.yml9
-rw-r--r--roles/core/base/tasks/OpenBSD.yml4
-rw-r--r--roles/core/base/tasks/main.yml4
3 files changed, 13 insertions, 4 deletions
diff --git a/roles/core/base/tasks/Debian.yml b/roles/core/base/tasks/Debian.yml
index 4d2abc17..43f1876e 100644
--- a/roles/core/base/tasks/Debian.yml
+++ b/roles/core/base/tasks/Debian.yml
@@ -156,6 +156,15 @@
state: "{{ base_enable_fstrim | ternary('started', 'stopped') }}"
enabled: "{{ base_enable_fstrim }}"
+- name: configure timezone
+ timezone:
+ name: "{{ base_timezone }}"
+ register: etc_localtime
+
+- name: make sure legacy /etc/timezone is in sync with /etc/localtime
+ when: etc_localtime is changed
+ command: dpkg-reconfigure -f noninteractive tzdata
+
- name: remove cloud-init bullshit
loop:
- /var/log/cloud-init.log
diff --git a/roles/core/base/tasks/OpenBSD.yml b/roles/core/base/tasks/OpenBSD.yml
index fbc06379..7ff4f324 100644
--- a/roles/core/base/tasks/OpenBSD.yml
+++ b/roles/core/base/tasks/OpenBSD.yml
@@ -13,3 +13,7 @@
openbsd_pkg:
name: "{{ base_packages_extra }}"
state: present
+
+- name: configure timezone
+ timezone:
+ name: "{{ base_timezone }}"
diff --git a/roles/core/base/tasks/main.yml b/roles/core/base/tasks/main.yml
index fe4a396c..a70bc7ad 100644
--- a/roles/core/base/tasks/main.yml
+++ b/roles/core/base/tasks/main.yml
@@ -34,7 +34,3 @@
copy:
src: "{{ global_files_dir }}/common/htoprc"
dest: "{{ item }}/.config/htop/"
-
-- name: configure timezone
- timezone:
- name: "{{ base_timezone }}"