Skip to content

locale_gen.py UbuntuMode bug #5281

@Bartosz-lab

Description

@Bartosz-lab

Summary

When I tried to use locales_gen module in my playbook to manage locales in Ubuntu 22.04 it did nothing.

Issue Type

Bug Report

Component Name

module locale_gen

Ansible Version

# Ubuntu 22.04
$ ansible --version
ansible [core 2.13.4rc1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/bartosz/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/bartosz/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
  jinja version = 3.0.3
  libyaml = True

Community.general Version

# Ubuntu 22.04
$ ansible-galaxy collection list community.general

# /home/bartosz/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.5.0  

Configuration

$ ansible-config dump --only-changed

OS / Environment

Ubuntu 22.04

Steps to Reproduce

    - name: Add Polish locales (don't add in ubuntu)
      community.general.locale_gen:
        name: pl_PL.UTF-8
        state: present
    
    - name: Delete English locales (don't delete on ubuntu)
      community.general.locale_gen:
        name: en_GB.UTF-8
        state: absent

Expected Results

I expected my script will set locales propertly, but it didn't work.

Actual Results

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions