diff --git a/scripts/run_molecule_in_ci_image.sh b/scripts/run_molecule_in_ci_image.sh index a0b46cb..3b17d85 100755 --- a/scripts/run_molecule_in_ci_image.sh +++ b/scripts/run_molecule_in_ci_image.sh @@ -11,7 +11,7 @@ set -euo pipefail selected="$(cat)" pins="$AC_ROOT/pins" -collections="" +extra_collections="" if sha256sum --quiet -c /opt/ci-pins.sha256; then echo "The pin files match the ci image; using the baked tools." else @@ -24,11 +24,11 @@ else ANSIBLE_COLLECTIONS_PATH="$pins/collections" \ ansible-galaxy collection install --force -r "$req" -p "$pins/collections" done - collections="$pins/collections:" + extra_collections="$pins/collections:" fi ansible --version molecule --version # The collection under test first; molecule also installs it into each scenario's ANSIBLE_HOME, # which the run script keeps in the job tree. -export ANSIBLE_COLLECTIONS_PATH="$AC_ROOT:$collections/opt/collections" +export ANSIBLE_COLLECTIONS_PATH="$AC_ROOT:${extra_collections}/opt/collections" exec scripts/run_molecule_scenarios.sh "$AC_ROOT/molecule-runs" <<< "$selected" diff --git a/tests/scripts/test_run_molecule_in_ci_image.py b/tests/scripts/test_run_molecule_in_ci_image.py index 2f125d2..2f197f4 100644 --- a/tests/scripts/test_run_molecule_in_ci_image.py +++ b/tests/scripts/test_run_molecule_in_ci_image.py @@ -27,6 +27,7 @@ exit 0 # The base python: `-m venv