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