mirror of https://github.com/ansible/ansible.git
Handle timezone updates on Ubuntu 16.04+ on containers (#27546)
* 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 OSspull/31970/head
parent
9007b51f93
commit
0c10e1ebe4
@ -0,0 +1,4 @@
|
||||
destructive
|
||||
posix/ci/group1
|
||||
skip/osx
|
||||
systemd
|
@ -0,0 +1,15 @@
|
||||
- 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'
|
Loading…
Reference in New Issue