From 66ce16ce557cdcb15af9e2ea05611b7c681321a6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 19 Nov 2025 14:40:00 +0100 Subject: [PATCH] fix: Remove bootstrap python setup from check mode Since we can't look into the variable `pythoncheck.rc`, as it doesn't exist, we skip the `when` check for checkmode -- its installation cannot run under any circumstance in the mode anyways. --- site.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site.yaml b/site.yaml index 7cdaf6c..0f89754 100644 --- a/site.yaml +++ b/site.yaml @@ -15,7 +15,11 @@ register: pythoncheck - name: install debian python ansible.builtin.raw: apt-get update && apt-get install python3 -y - when: pythoncheck.rc == 127 + when: not ansible_check_mode and pythoncheck.rc == 127 + - name: pretend installing debian python for check mode + ansible.builtin.debug: + msg: Pretending to install python... + when: ansible_check_mode - name: Prepare incus server host hosts: host_system