Compare commits

...

4 commits

Author SHA1 Message Date
David Prevot f92da7bdc4 [WIP] nginx: Drop preferences (pinning) for backports
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2630|18|2612|20|:+1: Output truncated.
gitea/ansible-roles/pipeline/head This commit looks good
TODO: on fait des trucs malins avec nginx et haproxy (on se repose sur
      l’exitence du fichier preferences pour tirer la bonne version), donc il
      va falloir remplacer cette logique par d’autres trucs malins (soit tirer
      les paquets avec -t, à traduire en « default_release » avec Ansible).
2023-10-26 17:56:19 +02:00
David Prevot c6ee7be329 [WIP] phpmyadmin: Drop preferences (pinning) for backports
It’s only useful for Buster.

TODO: tester
| TODO: Pour phpmyadmin dans buster, je croyais c’était facile vu qu’il
| n’est présent que dans backports, mais on est chocolats aussi parce que
| les dépendances sont des deux côtés, donc il va aussi falloir du -t,
| c’est-à-dire « default_release » avec Ansible.
2023-10-26 17:56:11 +02:00
David Prevot 6d3fafb294 evoacme: Drop now unused preferences for jessie-backports 2023-10-26 16:46:17 +02:00
David Prevot 6fb3eefde9 apt: Drop preferences (pinning) for backports 2023-10-26 16:46:17 +02:00
15 changed files with 9 additions and 71 deletions

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=bookworm-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=bullseye-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=buster-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=jessie-backports
Pin-Priority: 50

View file

@ -1,3 +0,0 @@
Package: *
Pin: release a=stretch-backports
Pin-Priority: 50

View file

@ -10,19 +10,9 @@
tags: tags:
- apt - apt
- name: Backports configuration
ansible.builtin.copy:
src: '{{ ansible_distribution_release }}_backports_preferences'
dest: /etc/apt/preferences.d/0-backports-defaults
force: true
mode: "0640"
register: apt_backports_config
tags:
- apt
- name: Apt update - name: Apt update
ansible.builtin.apt: ansible.builtin.apt:
update_cache: yes update_cache: yes
when: apt_backports_sources is changed or apt_backports_config is changed when: apt_backports_sources is changed
tags: tags:
- apt - apt

View file

@ -17,16 +17,6 @@
tags: tags:
- apt - apt
- name: Backports configuration
ansible.builtin.copy:
src: '{{ ansible_distribution_release }}_backports_preferences'
dest: /etc/apt/preferences.d/0-backports-defaults
force: true
mode: "0640"
register: apt_backports_config
tags:
- apt
- name: Archived backport are accepted (jessie) - name: Archived backport are accepted (jessie)
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
dest: '/etc/apt/apt.conf.d/99no-check-valid-until' dest: '/etc/apt/apt.conf.d/99no-check-valid-until'
@ -42,4 +32,4 @@
update_cache: yes update_cache: yes
tags: tags:
- apt - apt
when: apt_backports_list is changed or apt_backports_config is changed when: apt_backports_list is changed

View file

@ -8,10 +8,6 @@ describe file("/etc/apt/sources.list.d/backports.list") do
it { should be_file } it { should be_file }
end end
describe file("/etc/apt/preferences.d/0-backports-defaults") do
it { should be_file }
end
describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
its(:stdout) { should_not be_empty } its(:stdout) { should_not be_empty }
its(:exit_status) { should eq 0 } its(:exit_status) { should eq 0 }

View file

@ -1,3 +0,0 @@
Package: certbot python-certbot python-acme python-cryptography python-openssl python-setuptools python-ndg-httpsclient python-pyasn1 python-pkg-resources
Pin: release a=jessie-backports
Pin-Priority: 999

View file

@ -8,10 +8,6 @@ set :backend, :exec
# it { should be_file } # it { should be_file }
# end # end
# #
# describe file("/etc/apt/preferences.d/0-backports-defaults") do
# it { should be_file }
# end
#
# describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do # describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
# its(:stdout) { should_not be_empty } # its(:stdout) { should_not be_empty }
# its(:exit_status) { should eq 0 } # its(:exit_status) { should eq 0 }

View file

@ -13,6 +13,7 @@
ansible.builtin.apt: ansible.builtin.apt:
name: "{{ nginx_package_name | default(nginx_default_package_name) }}" name: "{{ nginx_package_name | default(nginx_default_package_name) }}"
state: present state: present
default_release: "{{ ansible_distribution_release }}-backports"
tags: tags:
- nginx - nginx
- packages - packages

View file

@ -8,17 +8,6 @@
- nginx - nginx
- packages - packages
- name: Prefer Nginx packages from backports
ansible.builtin.template:
src: apt/nginx_preferences
dest: /etc/apt/preferences.d/999-nginx
force: true
mode: "0640"
register: nginx_apt_preferences
tags:
- nginx
- packages
- name: APT cache is updated - name: APT cache is updated
ansible.builtin.apt: ansible.builtin.apt:
update_cache: yes update_cache: yes

View file

@ -1,3 +0,0 @@
Package: nginx nginx-* libnginx-* libssl*
Pin: release a={{ ansible_distribution_release }}-backports
Pin-Priority: 999

View file

@ -11,18 +11,18 @@
tasks_from: backports.yml tasks_from: backports.yml
when: ansible_distribution_major_version is version('10', '=') when: ansible_distribution_major_version is version('10', '=')
- name: Prefer phpMyAdmin package from backports (Debian 10) - name: Install phpmyadmin from backports (Debian 10)
ansible.builtin.template: ansible.builtin.apt:
src: phpmyadmin_apt_preferences.j2 name: phpmyadmin
dest: /etc/apt/preferences.d/999-phpmyadmin default_release: buster-backports
force: true update_cache: yes
mode: "0644"
when: ansible_distribution_major_version is version('10', '=') when: ansible_distribution_major_version is version('10', '=')
- name: Install phpmyadmin - name: Install phpmyadmin
ansible.builtin.apt: ansible.builtin.apt:
name: phpmyadmin name: phpmyadmin
update_cache: yes update_cache: yes
when: ansible_distribution_major_version is not version('10', '=')
- name: Check if phpmyadmin default configuration is present - name: Check if phpmyadmin default configuration is present
ansible.builtin.stat: ansible.builtin.stat:

View file

@ -1,3 +0,0 @@
Package: phpmyadmin php-twig
Pin: release a=buster-backports
Pin-Priority: 999