36 lines
757 B
YAML
36 lines
757 B
YAML
---
|
|
|
|
- include_role:
|
|
name: evolix/apt
|
|
tasks_from: backports.yml
|
|
tags:
|
|
- 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:
|
|
src: haproxy_apt_preferences.j2
|
|
dest: /etc/apt/preferences.d/999-haproxy
|
|
force: yes
|
|
mode: "0640"
|
|
register: haproxy_apt_preferences
|
|
tags:
|
|
- haproxy
|
|
- packages
|
|
|
|
- name: update apt
|
|
apt:
|
|
update_cache: yes
|
|
when: haproxy_apt_preferences is changed
|
|
tags:
|
|
- haproxy
|
|
- packages
|