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_firewall: true
|
||||||
manage_network: false
|
manage_network: false
|
||||||
network_type: static
|
network_type: static
|
||||||
|
locale_default: en_US.UTF-8
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- apache2-utils
|
- apache2-utils
|
||||||
|
@ -9,6 +9,27 @@
|
|||||||
name: gpg
|
name: gpg
|
||||||
state: present
|
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
|
- name: Manage root authorized_keys
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: authorized_keys.j2
|
src: authorized_keys.j2
|
||||||
|
Loading…
Reference in New Issue
Block a user