From ab2e308a6bcf4b216cb76075dffee65e1426c290 Mon Sep 17 00:00:00 2001 From: prakhar Date: Fri, 17 Apr 2026 12:39:40 +1000 Subject: [PATCH 1/2] disable ansible-runner-api when runtime-automation dir is missing If a showroom content repo does not include runtime-automation/, podman-compose fails with: statfs /opt/showroom/content/runtime-automation: no such file or directory This causes showroom.service to exit 125 and the OCP pod to be marked not-ready, returning 503 from the router. After cloning the content repo, stat the runtime-automation/ dir. If showroom_ansible_runner_api is true but the directory is absent, set the variable to false so compose_default_template.j2 skips the ansible-runner-api service block entirely. --- .../tasks/30-showroom-clone-and-inject.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml b/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml index 7ff7db3..b000561 100644 --- a/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml +++ b/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml @@ -11,6 +11,18 @@ become: true become_user: "{{ showroom_user }}" + - name: Check if runtime-automation directory exists in content repo + ansible.builtin.stat: + path: "{{ showroom_user_content_dir }}/runtime-automation" + register: r_runtime_automation_dir + + - name: Disable ansible runner API when runtime-automation dir is missing + ansible.builtin.set_fact: + showroom_ansible_runner_api: false + when: + - showroom_ansible_runner_api | default(false) | bool + - not r_runtime_automation_dir.stat.exists + - name: Setup and inject userdata into showroom repo when: showroom_var_inject | default(true) | bool block: From 39f936338c97bf29d28ae227a5977068e80a264f Mon Sep 17 00:00:00 2001 From: prakhar Date: Fri, 17 Apr 2026 12:45:40 +1000 Subject: [PATCH 2/2] fail provision clearly when runtime-automation dir is missing Instead of silently disabling the runner or letting podman-compose crash at startup with an opaque statfs error, fail early with an actionable message telling the content author exactly what to add. --- .../tasks/30-showroom-clone-and-inject.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml b/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml index b000561..ffe5bdd 100644 --- a/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml +++ b/roles/vm_workload_showroom/tasks/30-showroom-clone-and-inject.yml @@ -15,10 +15,16 @@ ansible.builtin.stat: path: "{{ showroom_user_content_dir }}/runtime-automation" register: r_runtime_automation_dir + when: showroom_ansible_runner_api | default(false) | bool - - name: Disable ansible runner API when runtime-automation dir is missing - ansible.builtin.set_fact: - showroom_ansible_runner_api: false + - name: Fail when runtime-automation dir is missing but ansible runner API is enabled + ansible.builtin.fail: + msg: >- + showroom_ansible_runner_api is true but the content repo + '{{ showroom_git_repo }}' (ref: {{ showroom_git_ref | default('main') }}) + does not contain a runtime-automation/ directory. + Add runtime-automation/ with at least module-XX/solve.yml and + module-XX/validation.yml stubs, or set showroom_ansible_runner_api: false. when: - showroom_ansible_runner_api | default(false) | bool - not r_runtime_automation_dir.stat.exists