Bladeren bron

locales and file path

master
bovenliggende
commit
a5af8d4686
5 gewijzigde bestanden met toevoegingen van 73 en 6 verwijderingen
  1. +9
    -0
      defaults/main.yaml
  2. +0
    -0
      tasks/fish.yaml
  3. +12
    -0
      tasks/locales.yaml
  4. +6
    -6
      tasks/main.yaml
  5. +46
    -0
      templates/default_locale.j2

+ 9
- 0
defaults/main.yaml Bestand weergeven

@@ -1,5 +1,14 @@
timezone: Europe/Berlin

locales_default:
lang: de_DE.UTF-8
language: de

locales_gen:
- de_DE.UTF-8

root_ssh_key: false

debian_distribution: bullseye
debian_components:
- main


tasks/fish.yml → tasks/fish.yaml Bestand weergeven


+ 12
- 0
tasks/locales.yaml Bestand weergeven

@@ -0,0 +1,12 @@
---

- name: Ensure a locale exists
community.general.locale_gen:
name: "{{item}}"
state: present
loop: "{{locales_gen}}"

- name: default locale
template:
src: default_locale.j2
dest: /etc/default/locale

+ 6
- 6
tasks/main.yaml Bestand weergeven

@@ -1,17 +1,17 @@
---

# user setup
- import_tasks: root_user
- import_tasks: fish
- import_tasks: ssh-agent
- import_tasks: root_user.yaml
- import_tasks: fish.yaml
- import_tasks: ssh-agent.yaml

# system setup
- import_tasks: hostname
- import_tasks: hostname.yaml
when:
- not ansible_bender is defined
- not container_type | default('') == 'podman'

- import_tasks: locales
- import_tasks: locales.yaml

- import_tasks: timezone.yaml
when: not ansible_bender is defined
@@ -25,5 +25,5 @@
- ansible_distribution == "Debian"
- not ansible_lsb.id is defined or ansible_lsb.id != "Raspbian"

- import_tasks: debian_packages
- import_tasks: debian_packages.yaml
when: ansible_distribution == "Debian"

+ 46
- 0
templates/default_locale.j2 Bestand weergeven

@@ -0,0 +1,46 @@
LANG="{{ locales_default.lang }}"
{% if locales_default.language is defined %}
LANGUAGE="{{ locales_default.language }}"
{% endif %}
{% if locales_default.lc_address is defined %}
LC_ADDRESS="{{ locales_default.lc_address }}"
{% endif %}
{% if locales_default.lc_all is defined %}
LC_ALL="{{ locales_default.lc_all }}"
{% endif %}
{% if locales_default.lc_collate is defined %}
LC_COLLATE="{{ locales_default.lc_collate }}"
{% endif %}
{% if locales_default.lc_ctype is defined %}
LC_CTYPE="{{ locales_default.lc_ctype }}"
{% endif %}
{% if locales_default.lc_identification is defined %}
LC_IDENTIFICATION="{{ locales_default.lc_identification }}"
{% endif %}
{% if locales_default.lc_measurement is defined %}
LC_MEASUREMENT="{{ locales_default.lc_measurement }}"
{% endif %}
{% if locales_default.lc_messages is defined %}
LC_MESSAGES="{{ locales_default.lc_messages }}"
{% endif %}
{% if locales_default.lc_monetary is defined %}
LC_MONETARY="{{ locales_default.lc_monetary }}"
{% endif %}
{% if locales_default.lc_name is defined %}
LC_NAME="{{ locales_default.lc_name }}"
{% endif %}
{% if locales_default.lc_numeric is defined %}
LC_NUMERIC="{{ locales_default.lc_numeric }}"
{% endif %}
{% if locales_default.lc_paper is defined %}
LC_PAPER="{{ locales_default.lc_paper }}"
{% endif %}
{% if locales_default.lc_response is defined %}
LC_RESPONSE="{{ locales_default.lc_response }}"
{% endif %}
{% if locales_default.lc_telephone is defined %}
LC_TELEPHONE="{{ locales_default.lc_telephone }}"
{% endif %}
{% if locales_default.lc_time is defined %}
LC_TIME="{{ locales_default.lc_time }}"
{% endif %}