Add locale configuration tasks to base role

This commit is contained in:
Kris Lamoureux 2023-10-18 16:32:09 -04:00
parent a65c4b9cf6
commit 31e0538b84
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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