Fix locales
Improve re-reading of facts after custom fact
This commit is contained in:
@@ -18,3 +18,10 @@
|
||||
ansible.builtin.systemd_service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
|
||||
- name: Reconfigure locales
|
||||
ansible.builtin.command:
|
||||
cmd: "dpkg-reconfigure locales"
|
||||
environment:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
changed_when: true
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
owner: "{{ ansible_user_id }}"
|
||||
group: "{{ ansible_user_id }}"
|
||||
mode: "0777"
|
||||
register: cpu_fact
|
||||
|
||||
- name: Re-read facts after adding custom fact
|
||||
- name: Re-read facts if custom fact was installed this run # noqa: no-handler
|
||||
ansible.builtin.setup:
|
||||
filter: ansible_local
|
||||
when: cpu_fact is changed
|
||||
|
||||
@@ -17,3 +17,5 @@
|
||||
regexp: "{{ ansible_host }}.*{{ inventory_hostname }}"
|
||||
line: "{{ ansible_host }} {{ inventory_hostname }}"
|
||||
state: present
|
||||
vars:
|
||||
ansible_remote_tmp: /tmp # Prevent warnings for auto-created tmp dir
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
question: locales/default_environment_locale
|
||||
value: en_US.UTF-8
|
||||
vtype: select
|
||||
notify: Reconfigure locales
|
||||
|
||||
- name: Set to generate locales
|
||||
- name: Generate required locales
|
||||
ansible.builtin.debconf:
|
||||
name: locales
|
||||
question: locales/locales_to_be_generated
|
||||
value: en_US.UTF-8 UTF-8
|
||||
value: en_US.UTF-8 UTF-8, nl_NL.UTF-8 UTF-8, en_GB.UTF-8 UTF-8
|
||||
vtype: multiselect
|
||||
notify: Reconfigure locales
|
||||
|
||||
Reference in New Issue
Block a user