Commit 33a0ce8e authored by ale's avatar ale

Use float_debian_dist for apt tasks that specify 'default_release'

Otherwise we risk referencing a source repo that does not exist, as
is the case for stretch-backports during a stretch -> buster upgrade.
parent e874c670
Pipeline #6150 failed with stages
in 20 minutes and 30 seconds
......@@ -11,10 +11,14 @@
# Install rsyslog from the backports repository. This isn't strictly
# necessary but it is done to have the same version of rsyslog on all
# hosts, including the log-collector.
#
# This sources.list check must use float_debian_dist because otherwise
# Ansible complains about the unknown source on dist upgrades.
# TODO: drop this check when stretch is obsolete.
- name: Install rsyslog packages from backports
apt:
name: "{{ packages }}"
default_release: "{{ 'stretch-backports' if ansible_distribution_release == 'stretch' else '' }}"
default_release: "{{ 'stretch-backports' if float_debian_dist == 'stretch' else '' }}"
state: present
vars:
packages:
......
......@@ -15,7 +15,7 @@
- name: Install rsyslog-elasticsearch package from backports
apt:
name: rsyslog-elasticsearch
default_release: "{{ 'stretch-backports' if ansible_distribution_release == 'stretch' else '' }}"
default_release: "{{ 'stretch-backports' if float_debian_dist == 'stretch' else '' }}"
state: present
- name: Create the rsyslog-collector logs dir
file:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment