]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: ensure shaman returns right repo
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 5 Feb 2021 19:41:21 +0000 (20:41 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 10 Mar 2021 15:43:04 +0000 (16:43 +0100)
Due to recent changes in shaman, there's a chance it returns the wrong
repository from architecture point of view.
We can query shaman and ask for the correct architecture to get around
this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 39649f0ce8dd1c7b911fb7442f16e141735685b0)

roles/ceph-common/tasks/installs/redhat_dev_repository.yml

index dc1a5394f1085a114e17346f3a0d866c2d37ce5f..f6b7a0674044450dc8d301a3e4760be7fcc6717b 100644 (file)
@@ -1,8 +1,15 @@
 ---
+- name: get latest available build
+  uri:
+    url: "https://shaman.ceph.com/api/search/?status=ready&project=ceph&flavor=default&distros=centos/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}&ref={{ ceph_dev_branch }}&sha1={{ ceph_dev_sha1 }}"
+    return_content: yes
+  run_once: true
+  register: latest_build
+
 - name: fetch ceph red hat development repository
   uri:
     # Use the centos repo since we don't currently have a dedicated red hat repo
-    url: https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/centos/{{ ansible_distribution_major_version }}/repo
+    url: "{{ (latest_build.content | from_json)[0]['chacra_url'] }}repo"
     return_content: yes
   register: ceph_dev_yum_repo