Add locale configuration tasks to base role
This commit is contained in:
parent
a65c4b9cf6
commit
31e0538b84
@ -2,6 +2,7 @@ allow_reboot: true
|
||||
manage_firewall: true
|
||||
manage_network: false
|
||||
network_type: static
|
||||
locale_default: en_US.UTF-8
|
||||
|
||||
packages:
|
||||
- apache2-utils
|
||||
|
@ -9,6 +9,27 @@
|
||||
name: gpg
|
||||
state: present
|
||||
|
||||
- name: Install locales
|
||||
ansible.builtin.apt:
|
||||
name: locales
|
||||
state: present
|
||||
|
||||
- name: Generate locale
|
||||
community.general.locale_gen:
|
||||
name: "{{ locale_default }}"
|
||||
state: present
|
||||
register: locale_gen_output
|
||||
|
||||
- name: Set the default locale
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/locale
|
||||
regexp: "^LANG="
|
||||
line: "LANG={{ locale_default }}"
|
||||
|
||||
- name: Reconfigure locales
|
||||
ansible.builtin.command: dpkg-reconfigure -f noninteractive locales
|
||||
when: locale_gen_output.changed
|
||||
|
||||
- name: Manage root authorized_keys
|
||||
ansible.builtin.template:
|
||||
src: authorized_keys.j2
|
||||
|
Loading…
Reference in New Issue
Block a user