apt: fix many stupid mistakes
This commit is contained in:
parent
367bda528f
commit
9358efedfe
|
@ -20,6 +20,22 @@
|
|||
tags:
|
||||
- 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
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
|
||||
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
|
||||
- { line: "APT::Periodic::Enable \"0\";", regexp: 'APT::Periodic::Enable' }
|
||||
when: apt_evolinux_config | bool
|
||||
tags:
|
||||
- apt
|
||||
when: apt_evolinux_config | bool
|
||||
|
||||
- name: DPkg invoke hooks
|
||||
lineinfile:
|
||||
|
@ -28,14 +28,14 @@
|
|||
- "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 /usr | grep -q /usr && mount -oremount /usr || true\"; };"
|
||||
when: apt_hooks | bool
|
||||
tags:
|
||||
- apt
|
||||
when: apt_hooks | bool
|
||||
|
||||
- name: Remove Aptitude
|
||||
apt:
|
||||
name: aptitude
|
||||
state: absent
|
||||
when: apt_remove_aptitude | bool
|
||||
tags:
|
||||
- apt
|
||||
when: apt_remove_aptitude | bool
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
- name: "Compatibility check"
|
||||
assert:
|
||||
that:
|
||||
- ansible_distribution = "Debian"
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version is version('8', '>=')
|
||||
msg: Only compatible with Debian >= 8
|
||||
tags:
|
||||
|
@ -17,7 +17,7 @@
|
|||
- apt
|
||||
when: ansible_distribution_major_version is version('10', '<')
|
||||
|
||||
- name: "certificates are installed to https repositories"
|
||||
- name: "certificates are installed for https repositories"
|
||||
apt:
|
||||
name:
|
||||
- ca-certificates
|
||||
|
@ -25,13 +25,13 @@
|
|||
- apt
|
||||
|
||||
- name: Custom configuration
|
||||
include: config.yml
|
||||
import_tasks: config.yml
|
||||
when: apt_config | bool
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Install basics repositories (Debian <12)
|
||||
include: basics.debian-lt-12.yml
|
||||
import_tasks: basics.oneline.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
|
@ -39,7 +39,7 @@
|
|||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Install basics repositories (Debian >=12)
|
||||
include: basics.debian-ge-12.yml
|
||||
import_tasks: basics.deb822.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
|
||||
- name: Install backports repositories (Debian <12)
|
||||
include: backports.debian-lt-12.yml
|
||||
import_tasks: backports.oneline.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
|
@ -56,7 +56,7 @@
|
|||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Install backports repositories (Debian >=12)
|
||||
include: backports.debian-ge-12.yml
|
||||
import_tasks: backports.deb822.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
|
||||
- name: Install Evolix Public repositories (Debian <12)
|
||||
include: evolix_public.debian-lt-12.yml
|
||||
import_tasks: evolix_public.oneline.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
|
@ -73,7 +73,7 @@
|
|||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Install Evolix Public repositories (Debian >=12)
|
||||
include: evolix_public.debian-ge-12.yml
|
||||
import_tasks: evolix_public.deb822.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
|
||||
- name: Install check for packages marked hold
|
||||
include: hold_packages.yml
|
||||
import_tasks: hold_packages.yml
|
||||
when: apt_install_hold_packages | bool
|
||||
tags:
|
||||
- apt
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
Types: deb
|
||||
URIs: https://mirror.evolix.org/debian
|
||||
URIs: http://mirror.evolix.org/debian
|
||||
Suites: bullseye-backports
|
||||
Components: {{ apt_backports_components | mandatory }}
|
||||
Enabled: yes
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
Types: deb
|
||||
URIs: https://mirror.evolix.org/debian
|
||||
URIs: http://mirror.evolix.org/debian
|
||||
Suites: bookworm bookworm-updates
|
||||
Components: {{ apt_basics_components | mandatory }}
|
||||
Enabled: yes
|
||||
|
||||
deb http://security.debian.org/debian-security bookworm-security {{ apt_basics_components | mandatory }}
|
||||
Enabled: yes
|
|
@ -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 New Issue