From 24864f694fb5f6804705ae3a18c3007ebbc6157d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Mon, 7 Oct 2024 12:35:23 +0200 Subject: [PATCH] Refs #8025 tasks from debian-base role tzdata refactor --- roles/debian-base/files/set-timezone.sh | 8 -------- roles/debian-base/tasks/tzdata.yml | 12 ++++++++++-- 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 roles/debian-base/files/set-timezone.sh diff --git a/roles/debian-base/files/set-timezone.sh b/roles/debian-base/files/set-timezone.sh deleted file mode 100644 index 9e17f1c..0000000 --- a/roles/debian-base/files/set-timezone.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo 'tzdata tzdata/Areas select Europe' | debconf-set-selections -echo 'tzdata tzdata/Zones/Europe select Madrid' | debconf-set-selections -echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections -rm /etc/timezone -rm /etc/localtime -dpkg-reconfigure -f noninteractive tzdata diff --git a/roles/debian-base/tasks/tzdata.yml b/roles/debian-base/tasks/tzdata.yml index f5e34a8..9560354 100644 --- a/roles/debian-base/tasks/tzdata.yml +++ b/roles/debian-base/tasks/tzdata.yml @@ -1,2 +1,10 @@ -- name: Configure the time zone - script: set-timezone.sh +- name: Configure debconf for tzdata + debconf: + name: tzdata + question: "{{ item.question }}" + value: "{{ item.value }}" + vtype: "string" + loop: + - { question: "tzdata/Areas", value: "Europe" } + - { question: "tzdata/Zones/Europe", value: "Madrid" } + - { question: "tzdata/Zones/Etc", value: "UTC" }