win_region - Set the region and format settings

New in version 2.3.

Synopsis

  • Set the location settings of a Windows Server.
  • Set the format settings of a Windows Server.
  • Set the unicode language settings of a Windows Server.
  • Copy across these settings to the default profile.

Parameters

Parameter Choices/Defaults Comments
copy_settings
    Choices:
  • true
  • false
Default:
no
This will copy the current format and location values to new user profiles and the welcome screen. This will only run if location, format or unicode_language has resulted in a change. If this process runs then it will always result in a change.
format
The language format to set for the current user, see https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx for a list of culture names to use. This needs to be set if location or unicode_language is not set.
location
The location to set for the current user, see https://msdn.microsoft.com/en-us/library/dd374073.aspx for a list of GeoIDs you can use and what location it relates to. This needs to be set if format or unicode_language is not set.
unicode_language
The unicode language format to set for all users, see https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx for a list of culture names to use. This needs to be set if location or format is not set. After setting this value a reboot is required for it to take effect.

Examples

# Set the region format to English United States
- win_region:
    format: en-US

# Set the region format to English Australia and copy settings to new profiles
- win_region:
    format: en-AU
    copy_settings: True

# Set the unicode language to English Great Britain, reboot if required
- win_region:
    unicode_language: en-GB
  register: result

- win_reboot:
  when: result.restart_required

# Set the location to United States
- win_region:
    location: 244

# Set format, location and unicode to English Australia and copy settings, reboot if required
- win_region:
    location: 12
    format: en-AU
    unicode_language: en-AU
  register: result

- win_reboot:
  when: result.restart_required

Return Values

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

Key Returned Description
changed
boolean
always
Whether anything was changed

Sample:
True
restart_required
boolean
success
Whether a reboot is required for the change to take effect

Sample:
True


Status

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

Author

  • Jordan Borean (@jborean93)

Hint

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

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