From d7571690a0242b905173bc26408583fdfe85388a Mon Sep 17 00:00:00 2001 From: Tom Kuchler Date: Thu, 14 Mar 2024 11:12:28 +0100 Subject: [PATCH] Ensure remote.dir is present before moving script --- src/roles/setup-suite/tasks/main.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/roles/setup-suite/tasks/main.yml b/src/roles/setup-suite/tasks/main.yml index c22e14a5..69df59d8 100644 --- a/src/roles/setup-suite/tasks/main.yml +++ b/src/roles/setup-suite/tasks/main.yml @@ -100,6 +100,13 @@ - name: Move python multi-command runner to remote - ansible.builtin.copy: - src: resources/runner.py - dest: "{{ remote.dir }}/runner.py" + block: + - name: Create dirs in path + ansible.builtin.file: + path: "{{ remote.dir }}" + state: directory + recurse: yes + - name: Move python runner + ansible.builtin.copy: + src: resources/runner.py + dest: "{{ remote.dir }}/runner.py"