]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Uses a more recent version of the CentOS stream 8 box
authorTeoman ONAY <tonay@ibm.com>
Tue, 7 Feb 2023 13:30:52 +0000 (14:30 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Fri, 3 Mar 2023 14:44:19 +0000 (15:44 +0100)
Uses the latest centos/streamX image available.

Signed-off-by: Teoman ONAY <tonay@ibm.com>
tests/scripts/vagrant_up.sh

index ffe88142f3b4eaf5def2ad11a6559162e4eb36e8..82fbd7ab65ce0b9f6e84ac611a7341bd0003ab07 100644 (file)
@@ -1,7 +1,10 @@
 #!/bin/bash
 
-vagrant box remove --force --provider libvirt --box-version 0 centos/stream8 || true
-vagrant box add --provider libvirt --name centos/stream8 https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-20220125.1.x86_64.vagrant-libvirt.box || true
+if [[ "${CEPH_ANSIBLE_VAGRANT_BOX}" =~ "centos/stream" ]]; then
+  EL_VERSION="${CEPH_ANSIBLE_VAGRANT_BOX: -1}"
+  LATEST_IMAGE="$(curl -s https://cloud.centos.org/centos/${EL_VERSION}-stream/x86_64/images/CHECKSUM | sed -nE 's/^SHA256.*\((.*-([0-9]+).*vagrant-libvirt.box)\).*$/\1/p' | sort -u | tail -n1)"
+  vagrant box add --force --provider libvirt --name "${CEPH_ANSIBLE_VAGRANT_BOX}" "https://cloud.centos.org/centos/${EL_VERSION}-stream/x86_64/images/${LATEST_IMAGE}" --force
+fi
 
 retries=0
 until [ $retries -ge 5 ]