localization-de.yml hinzugefügt

This commit is contained in:
olli 2023-08-21 11:49:18 +02:00
parent 682e16dbdf
commit c0fd6a1f3e

49
localization-de.yml Normal file
View File

@ -0,0 +1,49 @@
---
- name: Basic Debian Linux german localization
hosts: all
tasks:
- name: check if we are in an container env by existing systemd
stat:
path: /usr/bin/systemd
register: nocontainer
- name: Set timezone to Europe/Berlin
community.general.timezone:
name: Europe/Berlin
when: nocontainer.stat.exists == true
- name: German keyboard layout
ansible.builtin.lineinfile:
path: /etc/default/keyboard
regexp: '^XKBLAYOUT=".+$'
line: 'XKBLAYOUT="de"'
backup: yes
notify: setupcon
when: nocontainer.stat.exists == true
- name: nodeadkeys
ansible.builtin.lineinfile:
path: /etc/default/keyboard
regexp: '^XKBVARIANT=".+$'
line: 'XKBVARIANT="nodeadkeys"'
backup: yes
notify: setupcon
when: nocontainer.stat.exists == true
- name: Ensure de_DE.UTF-8 locale exists
community.general.locale_gen:
name: de_DE.UTF-8
state: present
notify: localectl
when: nocontainer.stat.exists == true
handlers:
- name: setupcon
ansible.builtin.shell: setupcon
- name: localectl
ansible.builtin.shell: localectl set-locale LANG=de_DE.UTF-8