From 97cc4c6286bc9e57192cb59c27ab4927235cd8c6 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 6 Dec 2020 00:44:26 -0600 Subject: [PATCH] Enable override of timezone name or hwclock independently --- defaults/main.yml | 6 +++--- tasks/main.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1f2ff4b..4504986 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- # defaults file for ensure_timezone -timezone: - hwclock: 'UTC' - name: 'UTC' +timezone_hwclock: 'UTC' +timezone_name: 'UTC' + diff --git a/tasks/main.yml b/tasks/main.yml index cf81396..cba813d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,8 +12,8 @@ ansible.builtin.package_facts: - name: 'Set timezone' community.general.timezone: - hwclock: '{{ timezone.hwclock }}' - name: '{{ timezone.name }}' + hwclock: '{{ timezone_hwclock }}' + name: '{{ timezone_name }}' register: 'results' - name: 'Restart if time zone changed' when: