From c5623f9afc648918f5c9c7e66079cac34133dbfe Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Fri, 3 Jan 2025 17:12:46 +0100
Subject: [PATCH] Fix Ansible fetch of pytest.xml

---
 test/integration-test.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/integration-test.yml b/test/integration-test.yml
index e6a5723f..3000cd1e 100644
--- a/test/integration-test.yml
+++ b/test/integration-test.yml
@@ -22,7 +22,8 @@
     - name: Run tests
       command: "podman run --rm --network host --mount type=bind,source=/tmp/test-config.yml,destination=/test-config.yml --mount type=bind,source=/artifacts,destination=/artifacts {{ test_image }}"
 
-    - stat:
+    - name: Check existence of pytest.xml
+      stat:
         path: "/artifacts/pytest.xml"
       register: pytest_xml_stat
 
@@ -30,14 +31,14 @@
       slurp:
         src: "/artifacts/pytest.xml"
       register: pytest_xml
-      when: "pytest_xml_stat.exists | default(False)"
+      when: "pytest_xml_stat.stat.exists"
 
     - name: Store test results locally
       local_action:
         module: copy
         dest: "{{ lookup('env', 'CI_PROJECT_DIR') | default('..') }}/pytest.xml"
         content: "{{ pytest_xml['content'] | b64decode }}"
-      when: "pytest_xml_stat.exists | default(False)"
+      when: "pytest_xml_stat.stat.exists"
 
   vars:
     test_image: "registry.git.autistici.org/ai3/float:integration-test"
-- 
GitLab