vn-ansible/roles/config-tzdata/tasks/main.yaml

29 lines
859 B
YAML

---
- 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: Run dpkg-reconfigure to apply the timezone changes
# command: dpkg-reconfigure -f noninteractive tzdata