aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/locale
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2024-12-26 13:18:07 +0100
committerEgor Tensin <egor@tensin.name>2024-12-26 13:18:13 +0100
commit32588adf72350fa64f4ed352410c07f64f076146 (patch)
tree61443dceb39f4ca3a0db8291f042ccaced4320c7 /roles/locale
parentv4.2.0 (diff)
downloadinfra-ansible-32588adf72350fa64f4ed352410c07f64f076146.tar.gz
infra-ansible-32588adf72350fa64f4ed352410c07f64f076146.zip
add locale role
Diffstat (limited to 'roles/locale')
-rw-r--r--roles/locale/README.md1
-rw-r--r--roles/locale/defaults/main.yml4
-rw-r--r--roles/locale/tasks/main.yml5
3 files changed, 10 insertions, 0 deletions
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