haproxy: adapt backports installed package list to distibution

This commit is contained in:
Jérémy Lecour 2020-06-14 12:35:44 +02:00 committed by Jérémy Lecour
parent e5d4ea3c18
commit 7f54b8ab60
4 changed files with 19 additions and 7 deletions

View File

@ -29,6 +29,7 @@ The **patch** part changes incrementally at each release.
* lxc-php: Do --no-install-recommends for ssmtp/opensmtpd
* packweb-apache: Don't turn on mod-evasive emails by default
* haproxy: chroot and socket path are configurable
* haproxy: adapt backports installed package list to distibution
* redis: create sudoers file if missing
* redis: new syntax for match filter
* redis: raise an error is port 6379 is used in "instance" mode

View File

@ -14,3 +14,6 @@ haproxy_maintenance_ips: []
haproxy_stats_enable: False
haproxy_stats_bind: "*:8080 ssl crt /etc/haproxy/ssl/"
haproxy_backports_packages_stretch: haproxy libssl1.0.0
haproxy_backports_packages_buster: haproxy

View File

@ -4,8 +4,16 @@
name: evolix/apt
tasks_from: backports.yml
tags:
- haproxy
- packages
- haproxy
- packages
- set_fact:
haproxy_backports_packages: "{{ haproxy_backports_packages_stretch }}"
when: ansible_distribution_release == 'stretch'
- set_fact:
haproxy_backports_packages: "{{ haproxy_backports_packages_buster }}"
when: ansible_distribution_release == 'buster'
- name: Prefer HAProxy package from backports
template:
@ -15,13 +23,13 @@
mode: "0640"
register: haproxy_apt_preferences
tags:
- haproxy
- packages
- haproxy
- packages
- name: update apt
apt:
update_cache: yes
when: haproxy_apt_preferences is changed
tags:
- haproxy
- packages
- haproxy
- packages

View File

@ -1,3 +1,3 @@
Package: haproxy libssl1.0.0
Package: {{ haproxy_backports_packages }}
Pin: release a={{ ansible_distribution_release }}-backports
Pin-Priority: 999