timezone - Configure timezone setting

New in version 2.2.

Synopsis

Parameters

Parameter Choices/Defaults Comments
hwclock
    Choices:
  • UTC
  • local
Whether the hardware clock is in UTC or in local timezone. Default is to keep current setting. Note that this option is recommended not to change and may fail to configure, especially on virtual environments such as AWS. At least one of name and hwclock are required. Only used on Linux.

aliases: rtc
name
Name of the timezone for the system clock. Default is to keep current setting. At least one of name and hwclock are required.

Notes

Note

  • On SmartOS the sm-set-timezone utility (part of the smtools package) is required to set the zone timezone

Examples

- name: set timezone to Asia/Tokyo
  timezone:
    name: Asia/Tokyo

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
diff
complex
success
The differences about the given arguments.

  after
dict
The values after change

  before
dict
The values before change



Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • Shinichi TAMURA (@tmshn)
  • Jasper Lievisse Adriaanse (@jasperla)
  • Indrajit Raychaudhuri (@indrajitr)

Hint

If you notice any issues in this documentation you can edit this document to improve it.