From 1a01afde9559a0ffa49bcad1b79bd321959149d2 Mon Sep 17 00:00:00 2001 From: Tobias Lehmann Date: Tue, 16 Apr 2024 11:17:23 +0200 Subject: [PATCH] refactored set locales --- roles/common/tasks/common.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/roles/common/tasks/common.yml b/roles/common/tasks/common.yml index f9a4e16..74ce2cd 100644 --- a/roles/common/tasks/common.yml +++ b/roles/common/tasks/common.yml @@ -1,3 +1,27 @@ + - name: Show host + tags: always + shell: echo $HOST + + - name: Show locales + tags: always + shell: locale -a + + - name: Generate en_US.UTF-8 + tags: always + shell: echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen + + - name: Generate de_DE.UTF-8 + tags: always + shell: echo 'de_DE.UTF-8 UTF-8' >> /etc/locale.gen + + - name: Locale Gen + tags: always + shell: locale-gen + + - name: Set default + tags: always + shell: echo 'LANG=en_US.UTF-8' > /etc/locale.conf + - name: ensure locales exist locale_gen: name: '{{ item }}' @@ -5,3 +29,12 @@ loop: - en_US.UTF-8 - de_DE.UTF-8 + + - name: Neustart (nach 5 Sekunden) + tags: always + reboot: + pre_reboot_delay: 5 + + - name: Show locales + tags: always + shell: locale -a