Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
David Prevot
290fc87f22 haproxy: Drop preferences (pinning) for backports
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
gitea/ansible-roles/pipeline/head This commit looks good
2025-01-15 17:27:35 +01:00
David Prevot
acc079bce2 nginx: Drop preferences (pinning) for backports 2025-01-15 17:27:35 +01:00
David Prevot
13666ac083 phpmyadmin: Drop preferences (pinning) for backports
It’s only useful for Buster.
2025-01-15 17:27:35 +01:00
David Prevot
dbb82682f9 evoacme: Drop now unused preferences for jessie-backports 2025-01-15 17:27:35 +01:00
David Prevot
af206114c9 apt: Drop preferences (pinning) for backports 2025-01-15 17:27:35 +01:00
11 changed files with 28 additions and 50 deletions

View file

@ -8,10 +8,6 @@ describe file("/etc/apt/sources.list.d/backports.list") do
it { should be_file }
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
its(:stdout) { should_not be_empty }
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 }
# 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
# its(:stdout) { should_not be_empty }
# its(:exit_status) { should eq 0 }

View file

@ -90,6 +90,17 @@
ansible.builtin.apt:
name: haproxy
state: present
when: not (haproxy_backports | bool)
tags:
- haproxy
- packages
- name: Install HAProxy package from backports
ansible.builtin.apt:
name: {{ haproxy_backports_packages }}
state: present
default_release: "{{ ansible_distribution_release }}-backports"
when: haproxy_backports | bool
tags:
- haproxy
- packages

View file

@ -23,21 +23,9 @@
haproxy_backports_packages: "{{ haproxy_backports_packages_bookworm }}"
when: ansible_distribution_release == 'bookworm'
- name: Prefer HAProxy package from backports
ansible.builtin.template:
src: haproxy_apt_preferences.j2
dest: /etc/apt/preferences.d/999-haproxy
force: true
mode: "0640"
register: haproxy_apt_preferences
tags:
- haproxy
- packages
- name: update apt
ansible.builtin.apt:
update_cache: yes
when: haproxy_apt_preferences is changed
tags:
- haproxy
- packages

View file

@ -1,3 +0,0 @@
Package: {{ haproxy_backports_packages }}
Pin: release a={{ ansible_distribution_release }}-backports
Pin-Priority: 999

View file

@ -13,6 +13,17 @@
ansible.builtin.apt:
name: "{{ nginx_package_name | default(nginx_default_package_name) }}"
state: present
when: not (nginx_backports | bool)
tags:
- nginx
- packages
- name: Nginx is installed from backports
ansible.builtin.apt:
name: "{{ nginx_package_name | default(nginx_default_package_name) }}"
state: present
default_release: "{{ ansible_distribution_release }}-backports"
when: nginx_backports | bool
tags:
- nginx
- packages

View file

@ -8,21 +8,9 @@
- nginx
- 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
ansible.builtin.apt:
update_cache: yes
when: nginx_apt_preferences is changed
tags:
- nginx
- packages

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
when: ansible_distribution_major_version is version('10', '=')
- name: Prefer phpMyAdmin package from backports (Debian 10)
ansible.builtin.template:
src: phpmyadmin_apt_preferences.j2
dest: /etc/apt/preferences.d/999-phpmyadmin
force: true
mode: "0644"
- name: Install phpmyadmin from backports (Debian 10)
ansible.builtin.apt:
name: phpmyadmin
default_release: buster-backports
update_cache: yes
when: ansible_distribution_major_version is version('10', '=')
- name: Install phpmyadmin
ansible.builtin.apt:
name: phpmyadmin
update_cache: yes
when: ansible_distribution_major_version is not version('10', '=')
- name: Check if phpmyadmin default configuration is present
ansible.builtin.stat:

View file

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