Compare commits
5 commits
stable
...
backports_
Author | SHA1 | Date | |
---|---|---|---|
|
290fc87f22 | ||
|
acc079bce2 | ||
|
13666ac083 | ||
|
dbb82682f9 | ||
|
af206114c9 |
11 changed files with 28 additions and 50 deletions
|
@ -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 }
|
||||
|
|
|
@ -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
|
|
@ -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 }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
Package: {{ haproxy_backports_packages }}
|
||||
Pin: release a={{ ansible_distribution_release }}-backports
|
||||
Pin-Priority: 999
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
Package: nginx nginx-* libnginx-* libssl*
|
||||
Pin: release a={{ ansible_distribution_release }}-backports
|
||||
Pin-Priority: 999
|
|
@ -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:
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
Package: phpmyadmin php-twig
|
||||
Pin: release a=buster-backports
|
||||
Pin-Priority: 999
|
Loading…
Add table
Reference in a new issue