test
This commit is contained in:
parent
ce1dc502ac
commit
64a4fd209f
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
echo "Europe" > /etc/timezone
|
||||||
|
ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime
|
||||||
|
dpkg-reconfigure -f noninteractive tzdata
|
|
@ -1,29 +1,17 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Set the timezone using dpkg-reconfigure
|
- name: copy script set_timezone.sh to tmp
|
||||||
expect:
|
copy:
|
||||||
command: dpkg-reconfigure -f noninteractive tzdata
|
src: set_timezone.sh
|
||||||
responses:
|
dest: /tmp/set_timezone.sh
|
||||||
"Geographic area:": "Europe"
|
owner: root
|
||||||
#- "Europe" # Replace with your desired geographic area
|
group: root
|
||||||
"Time zone:": "Madrid"
|
mode: '0744'
|
||||||
#- "Madrid" # Replace with your desired city or timezone
|
|
||||||
|
|
||||||
#- name: Set the timezone for tzdata package
|
- name: execute script set_timezone.sh
|
||||||
# debconf:
|
script: /tmp/set_timezone.sh
|
||||||
# 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
|
- name: delete script set_timezone.sh on tmp directory
|
||||||
# debconf:
|
file:
|
||||||
# name: tzdata
|
path: /tmp/set_timezone.sh
|
||||||
# question: "tzdata/Zones/Europe"
|
state: absent
|
||||||
# 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
|
|
Loading…
Reference in New Issue