Ansible, Windows and PowerShell: the Basics – Part 12, Set TimeZone

In Part 12 of this series we’ll continue our journey with Ansible, Windows and PowerShell and look at how to handle TimeZones in Windows.

In this example we will look at how to set the TimeZone using the Ansible win_timezone module to an alternative TimeZone to that which has already been configured.

Our current TimeZone is set to the default UTC:

Our job template in AWX is _11_timezone .

The contents of _11_timezone.yml are as follows:

Running a job from the _11_timezone job template produces the following result:

The TimeZone has been set to GMT as desired: