Skip to content

Commit 38d994d

Browse files
committed
unixPB: Ensure en_US.UTF-8 locale is generated on CentOS for build images
Signed-off-by: Stewart X Addison <sxa@ibm.com>
1 parent 417bb47 commit 38d994d

File tree

1 file changed

+8
-0
lines changed
  • ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks

1 file changed

+8
-0
lines changed

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/CentOS.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@
365365
###########
366366

367367
# Skipping linting as no alternative to shell can be used (lint error 305)
368+
368369
- name: Get locale list
369370
shell: locale -a
370371
register: localeList
@@ -375,6 +376,13 @@
375376

376377
# Skipping linting as locale_gen module isn't usable on CentOS6/7
377378
# https://github.com/ansible/ansible/issues/44708
379+
- name: Create US UTF-8 locale
380+
shell: localedef -i en_US -c -f UTF-8 en_US.UTF-8
381+
when: localeList.stdout | lower is not search("en_US\.utf8")
382+
tags:
383+
- locales
384+
- skip_ansible_lint
385+
378386
- name: Create Japanese locale
379387
shell: localedef -i ja_JP -c -f UTF-8 ja_JP.UTF-8
380388
when: localeList.stdout | lower is not search("ja_jp\.utf8")

0 commit comments

Comments
 (0)