From a143787c029c023402ac943fe3d579dacc8c5714 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 26 Feb 2025 17:26:27 +0000 Subject: [PATCH] ci: Handle custom package repositories in bootstrap role --- tests/image_prep/roles/bootstrap/defaults/main.yml | 1 + tests/image_prep/roles/bootstrap/templates/bootstrap.sh.j2 | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tests/image_prep/roles/bootstrap/defaults/main.yml b/tests/image_prep/roles/bootstrap/defaults/main.yml index 91e2fe57..198a6135 100644 --- a/tests/image_prep/roles/bootstrap/defaults/main.yml +++ b/tests/image_prep/roles/bootstrap/defaults/main.yml @@ -1 +1,2 @@ bootstrap_packages: [] +package_manager_repos: [] diff --git a/tests/image_prep/roles/bootstrap/templates/bootstrap.sh.j2 b/tests/image_prep/roles/bootstrap/templates/bootstrap.sh.j2 index c5a35a2b..0d25a95b 100644 --- a/tests/image_prep/roles/bootstrap/templates/bootstrap.sh.j2 +++ b/tests/image_prep/roles/bootstrap/templates/bootstrap.sh.j2 @@ -1,6 +1,12 @@ set -o errexit set -o nounset +{% for item in package_manager_repos %} +cat << "EOF" > "{{ item.dest }}" +{{ item.content }} +EOF +{% endfor %} + {% if bootstrap_packages %} if command -v apt-get; then apt-get -y update