Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locale_gen module cannot enable 'C' locale #8090

Closed
1 task done
EconomicTouristsArmLate opened this issue Mar 13, 2024 · 3 comments
Closed
1 task done

locale_gen module cannot enable 'C' locale #8090

EconomicTouristsArmLate opened this issue Mar 13, 2024 · 3 comments
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@EconomicTouristsArmLate
Copy link

EconomicTouristsArmLate commented Mar 13, 2024

Summary

Passing 'C.UTF-8' to community.general.locale_gen fails again with "msg": "The locale you've entered is not available on your system."

This is a regression, earlier report is #5142

Issue Type

Bug Report

Component Name

locale_gen

Ansible Version

$ ansible --version
ansible [core 2.16.4]
  config file = /home/norwin/src/ops/play_cmb_ops/ansible.cfg
  configured module search path = ['/home/norwin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/norwin/.cache/pypoetry/virtualenvs/cmb-play-vm-base-mQjeNL8I-py3.10/lib/python3.10/site-packages/ansible
  ansible collection location = /home/norwin/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/norwin/.cache/pypoetry/virtualenvs/cmb-play-vm-base-mQjeNL8I-py3.10/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/home/norwin/.cache/pypoetry/virtualenvs/cmb-play-vm-base-mQjeNL8I-py3.10/bin/python)
  jinja version = 3.1.3
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general

# /home/xxx/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 6.5.0  

# /home/xxx/.cache/pypoetry/virtualenvs/cmb-play-vm-base-mQjeNL8I-py3.10/lib/python3.10/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 8.4.0  

Configuration

$ ansible-config dump --only-changed
ANSIBLE_PIPELINING(/home/xxx/play_xxx/ansible.cfg) = True
CONFIG_FILE() = /home/xxx/play_xxx/ansible.cfg
DEFAULT_FORKS(/home/xxx/play_xxx/ansible.cfg) = 25
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/xxx/play_xxx/ansible.cfg) = True
DEFAULT_ROLES_PATH(/home/xxx/play_xxx/ansible.cfg) = ['/home/xxx/play_xxx/roles']
DEFAULT_STDOUT_CALLBACK(/home/xxx/play_xxx/ansible.cfg) = yaml
DISPLAY_SKIPPED_HOSTS(/home/xxx/play_xxx/ansible.cfg) = False

OS / Environment

target host: ubuntu 22.04.3
controller: ubuntu 22.04.3

Steps to Reproduce

ansible localhost -m community.general.locale_gen -a 'name=C.UTF-8'

Expected Results

should enable the obviously present locale

Actual Results

PLAY [Ansible Ad-Hoc] ***************************************************************************************************************************************************************************************

TASK [community.general.locale_gen] *************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => changed=false 
  msg: The locale you've entered is not available on your system.

PLAY RECAP **************************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Mar 13, 2024
@EconomicTouristsArmLate
Copy link
Author

EconomicTouristsArmLate commented Mar 13, 2024

Ignore me. Doing the bugreport, I saw that an old community.general version sneaked into the collection search path, which apparently is preferred over the more recent version in my project-specific ansible venv.
Setting COLLECTIONS_PATH in ansible.cfg removed the old collections in ~/.ansible/collections from the search path.

Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants