Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
###########

# Skipping linting as no alternative to shell can be used (lint error 305)

- name: Get locale list
shell: locale -a
register: localeList
Expand All @@ -375,6 +376,13 @@

# Skipping linting as locale_gen module isn't usable on CentOS6/7
# https://github.com/ansible/ansible/issues/44708
- name: Create US UTF-8 locale
shell: localedef -i en_US -c -f UTF-8 en_US.UTF-8
Copy link
Contributor

@andrew-m-leonard andrew-m-leonard Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note the OpenJDK make first checks for C.utf8 (ref: https://github.com/adoptium/jdk25u/blob/30a962c1ab3ef19159c3ea2179602289e7e6f3ac/make/autoconf/basic.m4#L139)
and then drops back to en_US.UTF-8

Should we alias to "C.utf8" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we alias to "C.utf8" ?

If that's possible then sure :-)

Also bear in mind that C.utf8 is not in the locales for the Linux/x64 image and we should probably strive for compatibility one way or another, and so we should be careful with testing if we're going to change such a default everywhere.

when: localeList.stdout | lower is not search("en_us\.utf8")
tags:
- locales
- skip_ansible_lint

- name: Create Japanese locale
shell: localedef -i ja_JP -c -f UTF-8 ja_JP.UTF-8
when: localeList.stdout | lower is not search("ja_jp\.utf8")
Expand Down
Loading