feat : Add default languages for APT translations
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 6s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 6s

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.
This commit is contained in:
2026-02-15 08:20:04 +01:00
parent e0a3c2464b
commit eb98128412
3 changed files with 40 additions and 0 deletions

31
tasks/apt.yml Normal file
View File

@@ -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

View File

@@ -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