diff --git a/defaults/main.yml b/defaults/main.yml index a432162..571c5e7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/ceph_preinstall_apt.yml b/tasks/ceph_preinstall_apt.yml index 24608fc..da08a89 100644 --- a/tasks/ceph_preinstall_apt.yml +++ b/tasks/ceph_preinstall_apt.yml @@ -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) }}" diff --git a/vars/debian.yml b/vars/debian.yml index 1efb354..6ae92b4 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -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') }}"