forked from ISTI-ansible-roles/ansible-roles
Set the requested timezone on Ubuntu 18.04+ using the timedatectl client.
This commit is contained in:
parent
f4904153b4
commit
e62d8b3ae6
|
@ -1,4 +1,9 @@
|
||||||
---
|
---
|
||||||
|
- name: Set the timezone on Ubuntu >=18
|
||||||
|
command: timedatectl set-timezone {{ timezone }}
|
||||||
|
when: ansible_distribution_version is version_compare('18.04', '>=')
|
||||||
|
tags: timezone
|
||||||
|
|
||||||
- name: Write the timezone file
|
- name: Write the timezone file
|
||||||
template: src=etc-timezone.j2 dest=/etc/timezone owner=root group=root mode=0644
|
template: src=etc-timezone.j2 dest=/etc/timezone owner=root group=root mode=0644
|
||||||
register: set_timezone
|
register: set_timezone
|
||||||
|
|
Loading…
Reference in New Issue