Skip to content

Commit 12c6385

Browse files
wbclarkekohl
authored andcommitted
Add an inherit_timezone role to copy timezone from host
1 parent d6e3556 commit 12c6385

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: roles/inherit_timezone/tasks/main.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- name: "Obtain Timezone from host machine"
3+
ansible.builtin.command: timedatectl show --property=Timezone --value
4+
delegate_to: localhost
5+
register: localhost_timezone
6+
7+
- name: "Set Timezone on guest machine"
8+
community.general.timezone:
9+
name: "{{ localhost_timezone.stdout }}"

0 commit comments

Comments
 (0)