community.general.locale_gen (8.5.0) — module

Creates or removes locales

Authors: Augustus Kling (@AugustusKling)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

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
  community.general.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
    type: str

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