0c10e1ebe4
* Handle timezone updates on Ubuntu 16.04+ on containers Although Ubuntu 16.04 will use timedatectl by default, containers without a working timedatectl need to use the old method. A bug in Ubuntu for the old method means having to write a nasty hack https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806 * Add tests for timezones Ensure timezone changes work across various OSs
15 lines
366 B
YAML
15 lines
366 B
YAML
- name: set timezone to Etc/UTC
|
|
timezone:
|
|
name: Etc/UTC
|
|
|
|
- name: set timezone to Australia/Brisbane
|
|
timezone:
|
|
name: Australia/Brisbane
|
|
register: timezone_set
|
|
|
|
- name: ensure timezone changed
|
|
assert:
|
|
that:
|
|
- timezone_set.changed
|
|
- timezone_set.diff.after.name == 'Australia/Brisbane'
|
|
- timezone_set.diff.before.name == 'Etc/UTC'
|