Merge "Map all relevant architectures for deb822 repository setup"

This commit is contained in:
Zuul 2024-09-30 18:34:12 +00:00 committed by Gerrit Code Review
commit 07d41f641f
3 changed files with 10 additions and 4 deletions

View File

@ -46,6 +46,14 @@ ceph_repo_url_region: "download" # see here for other mirros http://docs.ceph.c
ceph_repo_url: https://{{ ceph_repo_url_region }}.ceph.com/{{ _ceph_repo_distro_suffix }}-{{ ceph_stable_release }}
ceph_repos: "{{ _ceph_repos }}"
# Mappings from Ansible reported architecture to distro release architecture
ceph_architecture_mapping:
x86_64: amd64
ppc64le: ppc64el
s390x: s390x
armv7l: armhf
aarch64: arm64
# Ceph Authentication
cephx: true

View File

@ -42,8 +42,6 @@
- name: Manage apt repositories
vars:
_a: "{{ item.architectures }}"
_architecture_fixup: "{{ ((_a | d([])) is iterable and (_a | d([])) is not string) | ternary(_a, [_a]) | map('replace', 'x86_64', 'amd64') }}"
loop_label:
name: "{{ item.name }}"
uris: "{{ item.uris | default('') }}"
@ -53,7 +51,7 @@
allow_downgrade_to_insecure: "{{ item.allow_downgrade_to_insecure | default(omit) }}"
allow_insecure: "{{ item.allow_insecure | default(omit) }}"
allow_weak: "{{ item.allow_weak | default(omit) }}"
architectures: "{{ (_architecture_fixup | length > 0) | ternary(_architecture_fixup, omit) }}"
architectures: "{{ item.architectures | default(omit) }}"
by_hash: "{{ item.by_hash | default(omit) }}"
check_date: "{{ item.check_date | default(omit) }}"
check_valid_until: "{{ item.check_valid_until | default(omit) }}"

View File

@ -36,5 +36,5 @@ _ceph_repos:
uris: "{{ ceph_repo_url }}"
signed_by: "{{ lookup('file', 'gpg/460f3994') }}"
components: main
architectures: "{{ ansible_facts['architecture'] }}"
architectures: "{{ ceph_architecture_mapping.get(ansible_facts['architecture']) }}"
state: "{{ (ceph_pkg_source == 'ceph') | ternary('present', 'absent') }}"