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.
23 lines
689 B
YAML
23 lines
689 B
YAML
- 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
|
|
check_mode: no
|
|
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
|
|
|
|
- name: Configure Timezone
|
|
timezone:
|
|
name: "{{ system_timezone }}"
|