ansible.builtin.win_timezone (v2.9.27) — module

Sets Windows machine timezone

| "added in version" 2.1 of ansible.builtin"

Authors: Phil Schwartz (@schwartzmx)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Sets machine time to the specified timezone.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set timezone to 'Romance Standard Time' (GMT+01:00)
  win_timezone:
    timezone: Romance Standard Time
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set timezone to 'GMT Standard Time' (GMT)
  win_timezone:
    timezone: GMT Standard Time
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set timezone to 'Central Standard Time' (GMT-06:00)
  win_timezone:
    timezone: Central Standard Time

Inputs

    
timezone:
    description:
    - Timezone to set to.
    - 'Example: Central Standard Time'
    required: true
    type: str

Outputs

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

See also