Forge Home


Manage locales on Linux


481 latest version

5.0 quality score

Version information

  • 3.1.1 (latest)
  • 3.1.0
  • 3.0.0
  • 2.5.1
  • 2.5.0
  • 2.4.0
  • 2.3.0
  • 2.2.2
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.0.0
released Jul 13th 2022
This version is compatible with:
  • Puppet Enterprise 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
  • Puppet >=6.1.0 <8.0.0
  • Raspbian, Debian, Ubuntu, openSUSE, SLES, Archlinux, CentOS

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'saz-locales', '3.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add saz-locales
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install saz-locales --version 3.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



saz/locales — version 3.1.1 Jul 13th 2022

locales module for Puppet

Build Status

Manage locales via Puppet

Supported Puppet versions

  • Puppet >= 4
  • Last version supporting Puppet 3: v2.4.0


By default, en and de locales will be generated.

  class { 'locales': }

Configure a bunch of locales.

  class { 'locales':
    locales   => ['en_US.UTF-8 UTF-8', 'fr_CH.UTF-8 UTF-8'],

Advanced usage allows you to select which locales will be configured as well as the default one.

  class { 'locales':
    default_locale  => 'en_US.UTF-8',
    locales         => ['en_US.UTF-8 UTF-8', 'fr_CH.UTF-8 UTF-8'],

You can also set specific locale environment variables. See the locale man-page for available LC_* environment variables and their descriptions:

  class { 'locales':
    default_locale  => 'en_US.UTF-8',
    locales         => ['en_US.UTF-8 UTF-8', 'fr_CH.UTF-8 UTF-8', 'en_DK.UTF-8 UTF-8', 'de_DE.UTF-8 UTF-8' ],
    lc_time         => 'en_DK.UTF-8',
    lc_paper        => 'de_DE.UTF-8',

Other class parameters

  • locales: Name of locales to generate, default: ['en_US.UTF-8 UTF-8', 'de_DE.UTF-8 UTF-8']
  • ensure: present or absent, default: present
  • default_locale: string, default: 'C'. Set the default locale.
  • lc_ctype: string, default: undef. Character classification and case conversion.
  • lc_collate: string, default: undef. Collation order.
  • lc_time: string, default: undef. Date and time formats.
  • ...
  • autoupgrade: true or false, default: false. Auto-upgrade package, if there is a newer version.
  • package: string, default: OS specific. Set package name, if platform is not supported.
  • config_file: string, default: OS specific. Set config_file, if platform is not supported.
  • locale_gen_command: string, default: OS specific. Set locale_gen_command, if platform is not supported.
  • Suse specific:
    • root_uses_lang: if set to 'ctype', root will be stay POSIX, set to 'yes' to change root to the global language as well. Defaults to 'ctype'.
    • installed_languages: blank for english, otherwise space seperated list. Used by Yast2 only.
    • auto_detect_utf8: Workaround for missing forward of LANG and LC variables of e.g. ssh login connections. Defaults to 'no'.
    • input_method: A default input method to be used in X11. For more details see the comments at the top of /etc/X11/xim on a Suse system.