roles/common: use Ansible timezone module
No need to use a command for that. The module does it better because it doesn't register a change unless the timezone changes.
This commit is contained in:
parent
5b1530fa91
commit
bb14f05d2a
@ -4,8 +4,11 @@
|
|||||||
# client.
|
# client.
|
||||||
|
|
||||||
- name: Set timezone
|
- name: Set timezone
|
||||||
when: timezone is defined and ansible_service_mgr == 'systemd'
|
when:
|
||||||
command: /usr/bin/timedatectl set-timezone {{ timezone }}
|
- timezone is defined
|
||||||
|
- ansible_service_mgr == 'systemd'
|
||||||
|
community.general.timezone:
|
||||||
|
name: "{{ timezone }}"
|
||||||
tags: timezone
|
tags: timezone
|
||||||
|
|
||||||
# Apparently some cloud images don't have this installed by default. From what
|
# Apparently some cloud images don't have this installed by default. From what
|
||||||
|
Loading…
x
Reference in New Issue
Block a user