ansible-roles/haproxy/tasks/packages_backports.yml
Jérémy Lecour ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2777|524|2253|2462|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Use FQCN
Fully Qualified Collection Name
2023-03-20 23:33:19 +01:00

40 lines
993 B
YAML

---
- ansible.builtin.include_role:
name: evolix/apt
tasks_from: backports.yml
tags:
- haproxy
- packages
- ansible.builtin.set_fact:
haproxy_backports_packages: "{{ haproxy_backports_packages_stretch }}"
when: ansible_distribution_release == 'stretch'
- ansible.builtin.set_fact:
haproxy_backports_packages: "{{ haproxy_backports_packages_buster }}"
when: ansible_distribution_release == 'buster'
- ansible.builtin.set_fact:
haproxy_backports_packages: "{{ haproxy_backports_packages_bullseye }}"
when: ansible_distribution_release == 'bullseye'
- name: Prefer HAProxy package from backports
ansible.builtin.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
ansible.builtin.apt:
update_cache: yes
when: haproxy_apt_preferences is changed
tags:
- haproxy
- packages