Enable override of timezone name or hwclock independently

This commit is contained in:
Jason Rothstein 2020-12-06 00:44:26 -06:00
parent 3bddbe8573
commit 97cc4c6286
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
--- ---
# defaults file for ensure_timezone # defaults file for ensure_timezone
timezone: timezone_hwclock: 'UTC'
hwclock: 'UTC' timezone_name: 'UTC'
name: 'UTC'

View File

@ -12,8 +12,8 @@
ansible.builtin.package_facts: ansible.builtin.package_facts:
- name: 'Set timezone' - name: 'Set timezone'
community.general.timezone: community.general.timezone:
hwclock: '{{ timezone.hwclock }}' hwclock: '{{ timezone_hwclock }}'
name: '{{ timezone.name }}' name: '{{ timezone_name }}'
register: 'results' register: 'results'
- name: 'Restart if time zone changed' - name: 'Restart if time zone changed'
when: when: