Note
This plugin is part of the community.windows collection (version 1.7.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.windows
.
To use it in a playbook, specify: community.windows.win_region
.
Parameter | Choices/Defaults | Comments |
---|---|---|
copy_settings boolean |
| 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 string | 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 string | 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 string | 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. |
See also
The official documentation on the community.windows.win_timezone module.
- name: Set the region format to English United States community.windows.win_region: format: en-US - name: Set the region format to English Australia and copy settings to new profiles community.windows.win_region: format: en-AU copy_settings: yes - name: Set the location to United States community.windows.win_region: location: 244 # Reboot when region settings change - name: Set the unicode language to English Great Britain, reboot if required community.windows.win_region: unicode_language: en-GB register: result - ansible.windows.win_reboot: when: result.restart_required # Reboot when format, location or unicode has changed - name: Set format, location and unicode to English Australia and copy settings, reboot if required community.windows.win_region: location: 12 format: en-AU unicode_language: en-AU register: result - ansible.windows.win_reboot: when: result.restart_required
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
restart_required boolean | success | Whether a reboot is required for the change to take effect. Sample: True |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/windows/win_region_module.html