Use Debian major version in Debian wheel filenames

Between September 4 and 5, our wheel cache publication began failing
for Debian distributions. The ansible_distribution_version fact
began to differentiate between Debian minor versions (so e.g.
bullseye went from "11" to "11.7"), and this does not match our
cache scheme in AFS so resulted in attempts to write to a
nonexistent directory. This corresponds to when
I9527fc847e18a80414139ebd6f19a9dbb9a5778e merged to switch the
tenant's default Ansible version to 8, so is very likely a behavior
change in Ansible itself.

Switch the logic in our wheel-mirror playbook to use
ansible_distribution_major_version like we do for Ubuntu, and rename
the tasks to be a little more generic.

Change-Id: Ie95e99bce1ed01aa9c284871b517e6c28c278d16
This commit is contained in:
Jeremy Stanley 2023-10-06 11:57:01 +00:00
parent 2c847cfa28
commit dab0c7c606

View File

@ -7,16 +7,16 @@
serial: 1
pre_tasks:
- name: Generate AFS slug - CentOS
- name: Generate AFS slug - Major version distros
set_fact:
afs_slug: "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}"
when: ansible_distribution == "CentOS"
when: ansible_distribution == "CentOS" or
ansible_distribution == "Debian"
- name: Generate AFS slug - Debuntu
- name: Generate AFS slug - Major.Minor version distros
set_fact:
afs_slug: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture }}"
when: ansible_distribution == "Ubuntu" or
ansible_distribution == "Debian"
when: ansible_distribution == "Ubuntu"
- name: Set fact for AFS dir
set_fact: