From 970ec63841a2ed7d756e63e4519296eb0a1af290 Mon Sep 17 00:00:00 2001 From: rubenb Date: Fri, 27 Oct 2023 14:03:38 +0200 Subject: [PATCH] test --- roles/config-tzdata/tasks/main.yaml | 41 ++++++++++++++++++----------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/roles/config-tzdata/tasks/main.yaml b/roles/config-tzdata/tasks/main.yaml index a03c9d6..67a7856 100644 --- a/roles/config-tzdata/tasks/main.yaml +++ b/roles/config-tzdata/tasks/main.yaml @@ -1,20 +1,29 @@ --- -- name: Set the timezone for tzdata package - debconf: - name: tzdata - question: "tzdata/Areas" - vtype: select - value: "Europe" # Replace with the desired region, e.g., "America,Europe.." +- name: Set the timezone using dpkg-reconfigure + expect: + command: dpkg-reconfigure -f noninteractive tzdata + responses: + - "Geographic area:" + - "Europe" # Replace with your desired geographic area + - "Time zone:" + - "Madrid" # Replace with your desired city or timezone + +#- name: Set the timezone for tzdata package +# debconf: +# name: tzdata +# question: "tzdata/Areas" +# vtype: select +# value: "Europe" # Replace with the desired region, e.g., "America,Europe.." +# #state: present + +#- name: Set the city for tzdata package +# debconf: +# name: tzdata +# question: "tzdata/Zones/Europe" +# vtype: select +# value: "Madrid" # Replace with the desired city/timezone #state: present -- name: Set the city for tzdata package - debconf: - name: tzdata - question: "tzdata/Zones/Europe" - vtype: select - value: "Madrid" # Replace with the desired city/timezone - #state: present - -- name: Run dpkg-reconfigure to apply the timezone changes - command: dpkg-reconfigure -f noninteractive tzdata \ No newline at end of file +#- name: Run dpkg-reconfigure to apply the timezone changes +# command: dpkg-reconfigure -f noninteractive tzdata \ No newline at end of file