skipping the setting of the locale if it has already been set previously

This commit is contained in:
aminnairi
2024-01-02 20:26:15 +01:00
parent 9b105e9327
commit 22eeaff6f8
+7 -1
View File
@@ -3,6 +3,12 @@
community.general.locale_gen: community.general.locale_gen:
name: en_US.UTF-8 name: en_US.UTF-8
state: present state: present
- name: Get the current keymap
shell: localectl status | grep "VC Keymap" | cut -d " " -f 7
register: localectl_keymap_status_command
ignore_errors: true
changed_when: false
- name: Set the keyboard keymap - name: Set the keyboard keymap
become: true become: true
command: localectl set-keymap us command: "localectl set-keymap {{ locale }}"
when: 'localectl_keymap_status_command.stdout != locale'