From c0fd6a1f3e8e7adc03658be7406abbb304a0403b Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 21 Aug 2023 11:49:18 +0200 Subject: [PATCH] =?UTF-8?q?localization-de.yml=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- localization-de.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 localization-de.yml diff --git a/localization-de.yml b/localization-de.yml new file mode 100644 index 0000000..3e65124 --- /dev/null +++ b/localization-de.yml @@ -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