roles/common: ignore apt sources.list on Scaleway

While testing Debian 12 on Scaleway I noticed their apt sources.list
is in some weird format I've never seen before, so let's skip it on
those hosts.
This commit is contained in:
Alan Orth 2023-08-10 08:08:42 +02:00
parent 3c8250e6ac
commit b106f9d9e5
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 9 additions and 1 deletions

View File

@ -15,9 +15,17 @@
state: directory
when: ansible_distribution_major_version is version('12', '<')
# Scaleway seems to use a weird sources.list format as of Debian 12?
- name: Check for weird Debian sources
ansible.builtin.stat:
path: /etc/apt/sources.list.d/debian.sources
register: weird_debian_sources_stat
- name: Configure apt mirror
ansible.builtin.template: src=sources.list.j2 dest=/etc/apt/sources.list owner=root group=root mode=0644
when: ansible_architecture != 'armv7l'
when:
- ansible_architecture != 'armv7l'
- not weird_debian_sources_stat
- name: Set fact for base packages
ansible.builtin.set_fact: