From f9b11a160b76fa8d38b6f0bc4922e84da88e3178 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Thu, 20 Oct 2022 13:00:40 +0200 Subject: [PATCH] Retargetting log removal task Existing log dir removal task, added with Ia4e2fbbbd02d66522fc5f92441f9b6d3c0ebd840 was targetting wrong directory, essentially becoming useless. With this change the location will be cleaned up before execution of the tests as intened. Closes-Bug: #1993262 Signed-off-by: Jiri Podivin Change-Id: Ic2130702ca459b62a82682c7e85b89359ac6dcbe --- roles/validations/tasks/main.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/roles/validations/tasks/main.yaml b/roles/validations/tasks/main.yaml index c21ac1c..300383f 100644 --- a/roles/validations/tasks/main.yaml +++ b/roles/validations/tasks/main.yaml @@ -1,11 +1,21 @@ --- -- name: Remove validations log dir to ensure clean env +- name: Remove user local log dir to ensure clean env become: true file: - path: "{{ vf_log_dir }}" + path: "{{ ansible_user_dir }}/validations" state: absent -- name: Recreate validations Log dir exists +- name: Recreate user local log dir + become: true + file: + path: "{{ ansible_user_dir }}/validations" + state: directory + mode: "0755" + owner: "{{ ansible_user }}" + group: "{{ ansible_user }}" + recurse: true + +- name: Ensure validations Log dir exists become: true file: path: "{{ vf_log_dir }}"