ansible.builtin.win_region (v2.6.0) — module

Set the region and format settings

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

Authors: Jordan Borean (@jborean93)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.6.0

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set the region format to English United States
- win_region:
    format: en-US
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set the region format to English Australia and copy settings to new profiles
- win_region:
    format: en-AU
    copy_settings: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set the unicode language to English Great Britain, reboot if required
- win_region:
    unicode_language: en-GB
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- win_reboot:
  when: result.restart_required
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set the location to United States
- win_region:
    location: 244
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- win_reboot:
  when: result.restart_required

Inputs

    
format:
    description:
    - The language format to set for the current user, see U(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 C(location) or C(unicode_language)
      is not set.

location:
    description:
    - The location to set for the current user, see U(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 C(format) or C(unicode_language) is not set.

copy_settings:
    default: 'no'
    description:
    - This will copy the current format and location values to new user profiles and the
      welcome screen. This will only run if C(location), C(format) or C(unicode_language)
      has resulted in a change. If this process runs then it will always result in a change.
    type: bool

unicode_language:
    description:
    - The unicode language format to set for all users, see U(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 C(location) or C(format)
      is not set. After setting this value a reboot is required for it to take effect.

Outputs

restart_required:
  description: Whether a reboot is required for the change to take effect
  returned: success
  sample: true
  type: boolean