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
|
||||
expect:
|
||||
command: dpkg-reconfigure -f noninteractive tzdata
|
||||
responses:
|
||||
"Geographic area:": "Europe"
|
||||
#- "Europe" # Replace with your desired geographic area
|
||||
"Time zone:": "Madrid"
|
||||
#- "Madrid" # Replace with your desired city or timezone
|
||||
- name: copy script set_timezone.sh to tmp
|
||||
copy:
|
||||
src: set_timezone.sh
|
||||
dest: /tmp/set_timezone.sh
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0744'
|
||||
|
||||
#- 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: execute script set_timezone.sh
|
||||
script: /tmp/set_timezone.sh
|
||||
|
||||
#- 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
|
||||
- name: delete script set_timezone.sh on tmp directory
|
||||
file:
|
||||
path: /tmp/set_timezone.sh
|
||||
state: absent
|
Loading…
Reference in New Issue