Role name in Ansible Galaxy: williamyeh.reset-locale
This Ansible role has the following features:
- Install specific locale.
- Manually force locale settings (persistent).
This role is simply an attempt to solve the following problem:
"your locale in your local machine is set to XXX, which SSH forwards to and tries to use on the server, but your server does not have it installed."
Source: Ask Ubuntu
If you prefer a more complete locale solution, try alternatives such as f500.locale, Stouts.locale, cecepm.locale, and ssilab.locales.
User-configurable defaults:
# default locale
locale: "en_US.UTF-8"
# stop accepting locale env vars from your client to the server?
locale_stop: True
Add role name williamyeh.reset-locale
to your playbook file.
Set vars in your playbook file.
Simple example:
---
# file: simple-playbook.yml
- hosts: all
become: true
roles:
- williamyeh.reset-locale
vars:
locale: "en_US.UTF-8"
None.
Licensed under the MIT License. See the LICENSE file for details.
Rewritten from my pre-Galaxy version: server-config-template.