mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
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 OSs
This commit is contained in:
parent
9007b51f93
commit
0c10e1ebe4
3 changed files with 28 additions and 7 deletions
15
test/integration/targets/timezone/tasks/main.yml
Normal file
15
test/integration/targets/timezone/tasks/main.yml
Normal file
|
@ -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…
Add table
Add a link
Reference in a new issue