From cf24cdb5c2c8c142428ef9d945a65b4704b3d976 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 25 Feb 2024 20:59:14 +0100 Subject: [PATCH] set GMT +1 by default --- README.md | 4 +++- defaults/main.yml | 2 ++ tasks/main.yml | 4 ++++ tasks/timezone.yml | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 defaults/main.yml create mode 100644 tasks/main.yml create mode 100644 tasks/timezone.yml diff --git a/README.md b/README.md index fc20226..13dfb35 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # ansible_role_win_time -Ansible role to Set Timezone in Windows \ No newline at end of file +Ansible role to Set Timezone in Windows + +By default, we will use the 'Romance Standard Time' (GMT+01:00), bt you can modify it with the ``win_time__timezone`` variable. diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..5c60592 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +win_time__timezone: 'Romance Standard Time' diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..b93097f --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Set timezone + ansible.builtin.import_tasks: + file: timezone.yml diff --git a/tasks/timezone.yml b/tasks/timezone.yml new file mode 100644 index 0000000..b721a1e --- /dev/null +++ b/tasks/timezone.yml @@ -0,0 +1,4 @@ +--- +- name: "Set timezone to {{ win_time__timezone }}" + community.windows.win_timezone: + timezone: "{{ win_time__timezone }}"