You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
597 B
YAML
18 lines
597 B
YAML
5 years ago
|
- name: Ensure localisation files for '{{ system_locale }}' are available
|
||
|
locale_gen:
|
||
|
name: "{{ system_locale }}"
|
||
|
state: present
|
||
|
|
||
|
- name: Get current locale and language configuration
|
||
|
command: localectl status
|
||
|
register: locale_status
|
||
|
changed_when: false
|
||
|
|
||
|
- name: Parse 'LANG' from current locale and language configuration
|
||
|
set_fact:
|
||
|
locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}"
|
||
|
|
||
|
- name: Configure locale to '{{ system_locale }}'
|
||
|
command: localectl set-locale LANG={{ system_locale }}
|
||
|
changed_when: locale_lang != system_locale
|