win_timezone - Sets Windows machine timezone

New in version 2.1.

Synopsis

  • Sets machine time to the specified timezone.

Options

parameter required default choices comments
timezone
yes
Timezone to set to. Example Central Standard Time

Examples

- name: Set timezone to 'Romance Standard Time' (GMT+01:00)
  win_timezone:
    timezone: Romance Standard Time

- name: Set timezone to 'GMT Standard Time' (GMT)
  win_timezone:
    timezone: GMT Standard Time

- name: Set timezone to 'Central Standard Time' (GMT-06:00)
  win_timezone:
    timezone: Central Standard Time

Return Values

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

name description returned type sample
previous_timezone
The previous timezone if it was changed, otherwise the existing timezone
success string Central Standard Time
timezone
The current timezone (possibly changed)
success string Central Standard Time

Notes

Note

Status

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

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/win_timezone_module.html