From 692bdd098cbb00f096363e509b35eabf737ab06f Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 8 Feb 2023 09:44:49 +0100 Subject: [PATCH 1/2] validate: check for empty url (ceph_origin=custom) This checks if `custom_repo_url` is set to an empty string and makes the playbook fail in that case. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2097680 Signed-off-by: Guillaume Abrioux --- validate/preflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate/preflight.yml b/validate/preflight.yml index 9497e07..08a90b6 100644 --- a/validate/preflight.yml +++ b/validate/preflight.yml @@ -19,7 +19,7 @@ msg: "You must define 'ceph_custom_repositories' or 'custom_repo_url' when ceph_origin is 'custom'" when: - ceph_origin == 'custom' - - custom_repo_url is undefined + - (custom_repo_url is undefined or custom_repo_url == '') - ceph_custom_repositories is undefined - name: fail if baseurl is not defined for ceph_custom_repositories From c0db0fddb4a17268290968aef7eef2c89a2b91a0 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 8 Feb 2023 10:24:01 +0100 Subject: [PATCH 2/2] tests: add `set -ex` in vagrant_up.sh it makes troubleshooting easier in the CI. Signed-off-by: Guillaume Abrioux --- tests/scripts/vagrant_up.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/scripts/vagrant_up.sh b/tests/scripts/vagrant_up.sh index a990b6b..5fd0d5a 100644 --- a/tests/scripts/vagrant_up.sh +++ b/tests/scripts/vagrant_up.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -ex + 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)"