From eb981284120dc4e28062dcb9cae7d2924b1df5a7 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 15 Feb 2026 08:20:04 +0100 Subject: [PATCH 1/3] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20default=20languag?= =?UTF-8?q?es=20for=20APT=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds default languages for APT translations by updating the `defaults/main.yml` file and adding new tasks in `tasks/apt.yml` to configure APT translations and force IPv4. Additionally, a task to configure apt has been added. --- defaults/main.yml | 6 ++++++ tasks/apt.yml | 31 +++++++++++++++++++++++++++++++ tasks/main.yml | 3 +++ 3 files changed, 40 insertions(+) create mode 100644 tasks/apt.yml diff --git a/defaults/main.yml b/defaults/main.yml index 390e6ac..4196c5a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,3 +25,9 @@ proxmox_logrotate_notifempty: true # Destination override file proxmox_logrotate_file: /etc/logrotate.d/99-proxmox-custom + +# Default languages for APT translations +proxmox_apt_languages: + - "en" + - "es" + - "it" \ No newline at end of file diff --git a/tasks/apt.yml b/tasks/apt.yml new file mode 100644 index 0000000..03d4d1a --- /dev/null +++ b/tasks/apt.yml @@ -0,0 +1,31 @@ +--- +# ------------------------------------------------- +# Reduce apt translation downloads (use defaults) +# ------------------------------------------------- +- name: Configure APT translations using default languages + ansible.builtin.copy: + dest: /etc/apt/apt.conf.d/99-languages + content: | + Acquire::Languages { + {% for lang in proxmox_apt_languages %} + "{{ lang }}"; + {% endfor %} + }; + owner: root + group: root + mode: '0644' + +# ------------------------------------------------- +# Force APT to use IPv4 +# ------------------------------------------------- +- name: Force APT to use IPv4 + ansible.builtin.copy: + dest: /etc/apt/apt.conf.d/99force-ipv4 + content: 'Acquire::ForceIPv4 "true";' + owner: root + group: root + mode: '0644' + +- name: Update apt cache + ansible.builtin.apt: + update_cache: yes diff --git a/tasks/main.yml b/tasks/main.yml index 02fb3fc..b00e094 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,6 +16,9 @@ # Other tasks # =================== +- name: Configure apt + ansible.builtin.import_tasks: apt.yml + - name: Disable enterprise repo, enable no-subscription ansible.builtin.import_tasks: repos.yml -- 2.49.1 From 1140da4d755471587861238b193b44c0b2853189 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 15 Feb 2026 08:21:14 +0100 Subject: [PATCH 2/3] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Remove=20duplicate?= =?UTF-8?q?=20language=20entry=20in=20proxmox=5Fapt=5Flanguages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes a duplicate language entry from the `proxmox_apt_languages` configuration to ensure uniqueness and avoid potential conflicts. --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4196c5a..3e2af6a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -30,4 +30,4 @@ proxmox_logrotate_file: /etc/logrotate.d/99-proxmox-custom proxmox_apt_languages: - "en" - "es" - - "it" \ No newline at end of file + - "it" -- 2.49.1 From fe3acd58e8b7a94e4e4ddcbd191c424ef03fe3a0 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 15 Feb 2026 08:22:52 +0100 Subject: [PATCH 3/3] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor?= =?UTF-8?q?=20task=20names=20for=20clarity=20and=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated task names in `tasks/apt.yml` to be more descriptive and consistent, improving readability and maintainability. --- tasks/apt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/apt.yml b/tasks/apt.yml index 03d4d1a..31c4f15 100644 --- a/tasks/apt.yml +++ b/tasks/apt.yml @@ -2,7 +2,7 @@ # ------------------------------------------------- # Reduce apt translation downloads (use defaults) # ------------------------------------------------- -- name: Configure APT translations using default languages +- name: apt | Configure APT translations using default languages ansible.builtin.copy: dest: /etc/apt/apt.conf.d/99-languages content: | @@ -18,7 +18,7 @@ # ------------------------------------------------- # Force APT to use IPv4 # ------------------------------------------------- -- name: Force APT to use IPv4 +- name: apt | Force APT to use IPv4 ansible.builtin.copy: dest: /etc/apt/apt.conf.d/99force-ipv4 content: 'Acquire::ForceIPv4 "true";' @@ -26,6 +26,6 @@ group: root mode: '0644' -- name: Update apt cache +- name: apt | Update apt cache ansible.builtin.apt: update_cache: yes -- 2.49.1