diff options
author | Egor Tensin <egor@tensin.name> | 2024-12-26 13:18:07 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2024-12-26 13:18:13 +0100 |
commit | 32588adf72350fa64f4ed352410c07f64f076146 (patch) | |
tree | 61443dceb39f4ca3a0db8291f042ccaced4320c7 | |
parent | v4.2.0 (diff) | |
download | infra-ansible-32588adf72350fa64f4ed352410c07f64f076146.tar.gz infra-ansible-32588adf72350fa64f4ed352410c07f64f076146.zip |
add locale role
-rw-r--r-- | roles/debian_server/defaults/main.yml | 3 | ||||
-rw-r--r-- | roles/debian_server/meta/main.yml | 3 | ||||
-rw-r--r-- | roles/locale/README.md | 1 | ||||
-rw-r--r-- | roles/locale/defaults/main.yml | 4 | ||||
-rw-r--r-- | roles/locale/tasks/main.yml | 5 |
5 files changed, 16 insertions, 0 deletions
diff --git a/roles/debian_server/defaults/main.yml b/roles/debian_server/defaults/main.yml index 80776a4..a4661c8 100644 --- a/roles/debian_server/defaults/main.yml +++ b/roles/debian_server/defaults/main.yml @@ -14,3 +14,6 @@ debian_server_packages: - vim - wget debian_server_unattended_upgrades: false +debian_server_locale_list: + # The saner option for Europe. + - en_GB.UTF-8 diff --git a/roles/debian_server/meta/main.yml b/roles/debian_server/meta/main.yml index c69b6ab..6ecaff6 100644 --- a/roles/debian_server/meta/main.yml +++ b/roles/debian_server/meta/main.yml @@ -3,6 +3,9 @@ dependencies: vars: apt_packages: '{{ debian_server_packages }}' apt_unattended_upgrades: '{{ debian_server_unattended_upgrades }}' + - role: locale + vars: + locale_list: '{{ debian_server_locale_list }}' - role: sshd - role: journald - role: linux_status diff --git a/roles/locale/README.md b/roles/locale/README.md new file mode 100644 index 0000000..7740691 --- /dev/null +++ b/roles/locale/README.md @@ -0,0 +1 @@ +This role sets up locales of your choice, including en_US.UTF-8. diff --git a/roles/locale/defaults/main.yml b/roles/locale/defaults/main.yml new file mode 100644 index 0000000..0072326 --- /dev/null +++ b/roles/locale/defaults/main.yml @@ -0,0 +1,4 @@ +# en_US.UTF-8 is always included. +locale_list: + # The better locale for Europe, compared to en_US. + - en_GB.UTF-8 diff --git a/roles/locale/tasks/main.yml b/roles/locale/tasks/main.yml new file mode 100644 index 0000000..54fd42d --- /dev/null +++ b/roles/locale/tasks/main.yml @@ -0,0 +1,5 @@ +- name: Set up locales + become: true + community.general.locale_gen: + name: "{{ locale_list + ['en_US.UTF-8'] }}" + state: present |