From c7a983434814fc19a5e3b618025c4249aaa6a68f Mon Sep 17 00:00:00 2001 From: "Chandan Kumar (raukadah)" Date: Mon, 21 Sep 2020 14:32:25 +0530 Subject: [PATCH] Make sure dump_vars_log_dir dir exists https://review.opendev.org/752309 made changes to dump_vars role and make loose become, but it leads to permission denied while creating dump_vars_log_dir. Setting proper permission and enabling become fixes the issue. Closes-Bug: #1896439 Change-Id: I4c6a0333cc2fc8cf4d042740baafc28b2e08a5ee Signed-off-by: Chandan Kumar (raukadah) --- roles/dump_vars/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/dump_vars/tasks/main.yml b/roles/dump_vars/tasks/main.yml index 3144f1f08..d88f4940f 100644 --- a/roles/dump_vars/tasks/main.yml +++ b/roles/dump_vars/tasks/main.yml @@ -1,6 +1,10 @@ --- - name: Prepare directory with extra logs - file: dest={{ dump_vars_log_dir }} state=directory + become: true + file: + dest: "{{ dump_vars_log_dir }}" + state: directory + mode: 0777 - name: generate dump_variables_vars script template: