ansible.builtin.locale_gen (v2.9.27) — module

Creates or removes locales

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

Authors: Augustus Kling (@AugustusKling)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manages locales by editing /etc/locale.gen and invoking locale-gen.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure a locale exists
  locale_gen:
    name: de_CH.UTF-8
    state: present

Inputs

    
name:
    description:
    - Name and encoding of the locale, such as "en_GB.UTF-8".
    required: true

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether the locale shall be present.