Skip to content

William-Yeh/ansible-reset-locale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

williamyeh.reset-locale for Ansible Galaxy

Summary

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.

Role Variables

Optional variables

User-configurable defaults:

# default locale
locale: "en_US.UTF-8"

# stop accepting locale env vars from your client to the server?
locale_stop: True

Usage

Step 1: add role

Add role name williamyeh.reset-locale to your playbook file.

Step 2: add variables

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"

Dependencies

None.

License

Licensed under the MIT License. See the LICENSE file for details.

History

Rewritten from my pre-Galaxy version: server-config-template.

About

An Ansible role that resets locale, in the format for Ansible Galaxy

Resources

License

Stars

Watchers

Forks

Packages

No packages published