apt: fix many stupid mistakes
This commit is contained in:
parent
367bda528f
commit
9358efedfe
|
@ -20,6 +20,22 @@
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
|
- name: Find one-line APT sources
|
||||||
|
ansible.builtin.find:
|
||||||
|
paths: /etc/apt
|
||||||
|
patterns: '*.list'
|
||||||
|
register: list_files
|
||||||
|
|
||||||
|
- name: Disable one-line-formatted sources
|
||||||
|
command: "mv --verbose {{ item.path }} {{ item.path }}.bak"
|
||||||
|
environment:
|
||||||
|
LC_ALL: C
|
||||||
|
loop: "{{ list_files.files }}"
|
||||||
|
register: rename_cmd
|
||||||
|
changed_when: "'renamed' in rename_cmd.stdout"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Apt update
|
- name: Apt update
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
|
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
|
||||||
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
|
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
|
||||||
- { line: "APT::Periodic::Enable \"0\";", regexp: 'APT::Periodic::Enable' }
|
- { line: "APT::Periodic::Enable \"0\";", regexp: 'APT::Periodic::Enable' }
|
||||||
when: apt_evolinux_config | bool
|
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
when: apt_evolinux_config | bool
|
||||||
|
|
||||||
- name: DPkg invoke hooks
|
- name: DPkg invoke hooks
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -28,14 +28,14 @@
|
||||||
- "DPkg::Pre-Invoke { \"df /usr | grep -q /usr && mount -oremount,rw /usr || true\"; };"
|
- "DPkg::Pre-Invoke { \"df /usr | grep -q /usr && mount -oremount,rw /usr || true\"; };"
|
||||||
- "DPkg::Post-Invoke { \"df /tmp | grep -q /tmp && mount -oremount /tmp || true\"; };"
|
- "DPkg::Post-Invoke { \"df /tmp | grep -q /tmp && mount -oremount /tmp || true\"; };"
|
||||||
- "DPkg::Post-Invoke { \"df /usr | grep -q /usr && mount -oremount /usr || true\"; };"
|
- "DPkg::Post-Invoke { \"df /usr | grep -q /usr && mount -oremount /usr || true\"; };"
|
||||||
when: apt_hooks | bool
|
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
when: apt_hooks | bool
|
||||||
|
|
||||||
- name: Remove Aptitude
|
- name: Remove Aptitude
|
||||||
apt:
|
apt:
|
||||||
name: aptitude
|
name: aptitude
|
||||||
state: absent
|
state: absent
|
||||||
when: apt_remove_aptitude | bool
|
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
when: apt_remove_aptitude | bool
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
- name: "Compatibility check"
|
- name: "Compatibility check"
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- ansible_distribution = "Debian"
|
- ansible_distribution == "Debian"
|
||||||
- ansible_distribution_major_version is version('8', '>=')
|
- ansible_distribution_major_version is version('8', '>=')
|
||||||
msg: Only compatible with Debian >= 8
|
msg: Only compatible with Debian >= 8
|
||||||
tags:
|
tags:
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
- apt
|
- apt
|
||||||
when: ansible_distribution_major_version is version('10', '<')
|
when: ansible_distribution_major_version is version('10', '<')
|
||||||
|
|
||||||
- name: "certificates are installed to https repositories"
|
- name: "certificates are installed for https repositories"
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
|
@ -25,13 +25,13 @@
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Custom configuration
|
- name: Custom configuration
|
||||||
include: config.yml
|
import_tasks: config.yml
|
||||||
when: apt_config | bool
|
when: apt_config | bool
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Install basics repositories (Debian <12)
|
- name: Install basics repositories (Debian <12)
|
||||||
include: basics.debian-lt-12.yml
|
import_tasks: basics.oneline.yml
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when:
|
when:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
- ansible_distribution_major_version is version('12', '<')
|
- ansible_distribution_major_version is version('12', '<')
|
||||||
|
|
||||||
- name: Install basics repositories (Debian >=12)
|
- name: Install basics repositories (Debian >=12)
|
||||||
include: basics.debian-ge-12.yml
|
import_tasks: basics.deb822.yml
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when:
|
when:
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: Install backports repositories (Debian <12)
|
- name: Install backports repositories (Debian <12)
|
||||||
include: backports.debian-lt-12.yml
|
import_tasks: backports.oneline.yml
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when:
|
when:
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
- ansible_distribution_major_version is version('12', '<')
|
- ansible_distribution_major_version is version('12', '<')
|
||||||
|
|
||||||
- name: Install backports repositories (Debian >=12)
|
- name: Install backports repositories (Debian >=12)
|
||||||
include: backports.debian-ge-12.yml
|
import_tasks: backports.deb822.yml
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when:
|
when:
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: Install Evolix Public repositories (Debian <12)
|
- name: Install Evolix Public repositories (Debian <12)
|
||||||
include: evolix_public.debian-lt-12.yml
|
import_tasks: evolix_public.oneline.yml
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when:
|
when:
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
- ansible_distribution_major_version is version('12', '<')
|
- ansible_distribution_major_version is version('12', '<')
|
||||||
|
|
||||||
- name: Install Evolix Public repositories (Debian >=12)
|
- name: Install Evolix Public repositories (Debian >=12)
|
||||||
include: evolix_public.debian-ge-12.yml
|
import_tasks: evolix_public.deb822.yml
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when:
|
when:
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: Install check for packages marked hold
|
- name: Install check for packages marked hold
|
||||||
include: hold_packages.yml
|
import_tasks: hold_packages.yml
|
||||||
when: apt_install_hold_packages | bool
|
when: apt_install_hold_packages | bool
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
Types: deb
|
Types: deb
|
||||||
URIs: https://mirror.evolix.org/debian
|
URIs: http://mirror.evolix.org/debian
|
||||||
Suites: bullseye-backports
|
Suites: bullseye-backports
|
||||||
Components: {{ apt_backports_components | mandatory }}
|
Components: {{ apt_backports_components | mandatory }}
|
||||||
Enabled: yes
|
Enabled: yes
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
Types: deb
|
Types: deb
|
||||||
URIs: https://mirror.evolix.org/debian
|
URIs: http://mirror.evolix.org/debian
|
||||||
Suites: bookworm bookworm-updates
|
Suites: bookworm bookworm-updates
|
||||||
Components: {{ apt_basics_components | mandatory }}
|
Components: {{ apt_basics_components | mandatory }}
|
||||||
Enabled: yes
|
Enabled: yes
|
||||||
|
|
||||||
deb http://security.debian.org/debian-security bookworm-security {{ apt_basics_components | mandatory }}
|
|
8
apt/templates/evolix_public.sources.j2
Normal file
8
apt/templates/evolix_public.sources.j2
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
Types:deb
|
||||||
|
URIs: http://pub.evolix.org/evolix
|
||||||
|
Suites: {{ ansible_distribution_release }}
|
||||||
|
Components: main
|
||||||
|
Signed-by: {{ apt_keyring_dir }}/pub_evolix.asc
|
||||||
|
Enabled: yes
|
Loading…
Reference in a new issue