From 3c5d3db96bae9f534a6daa8de3ad4c3b31d05b55 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 16 Feb 2026 14:36:19 +0000 Subject: [PATCH 1/2] Adds os_images_rhel_debootstrap_enabled Use case is when you don't want this role to modify package repos, but you still want debootstrap. --- roles/os_images/defaults/main.yml | 4 ++++ roles/os_images/vars/RedHat.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/os_images/defaults/main.yml b/roles/os_images/defaults/main.yml index 2503d6d..e0b6ff4 100644 --- a/roles/os_images/defaults/main.yml +++ b/roles/os_images/defaults/main.yml @@ -101,3 +101,7 @@ os_images_hide: false # Visibility of images ('public' requires admin rights.) os_images_visibility: "{{ 'public' if os_images_public | bool else 'private' }}" + +# Whether or not to install debootstrap on Linux distributions in the RedHat family. +# This allows you to build Debian based images on RedHat hosts. Requires EPEL. +os_images_rhel_debootstrap_enabled: "{{ os_images_install_epel_repo }}" diff --git a/roles/os_images/vars/RedHat.yml b/roles/os_images/vars/RedHat.yml index f11b3ac..f7afeb6 100644 --- a/roles/os_images/vars/RedHat.yml +++ b/roles/os_images/vars/RedHat.yml @@ -1,7 +1,7 @@ --- # List of package dependencies. os_images_package_dependencies: - - debootstrap + - "{% if os_images_rhel_debootstrap_enabled | bool %}debootstrap{% endif %}" - dosfstools - gdisk - "{% if os_images_git_elements | length > 0 %}git{% endif %}" From 8e4b459312861485378bbd61ad43d668b301fb37 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 16 Feb 2026 19:42:51 +0000 Subject: [PATCH 2/2] Relax requirement for having docker wrapper enabled --- roles/os_images/tasks/prechecks.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/os_images/tasks/prechecks.yml b/roles/os_images/tasks/prechecks.yml index e3a008c..8cbe80d 100644 --- a/roles/os_images/tasks/prechecks.yml +++ b/roles/os_images/tasks/prechecks.yml @@ -1,8 +1,9 @@ --- -# Here a quick check for the presence of Docker (or an alias for Podman) -# Display a warning if not found +# Check for the presence of Docker or Podman as this is +# required for building container based images. +# Error out if not found. - name: Check if container engine is installed - ansible.builtin.command: which docker + ansible.builtin.shell: which docker || which podman changed_when: false ignore_errors: true register: result