From be15ae89969984b737d5d15935f63a0c3ccd6d11 Mon Sep 17 00:00:00 2001 From: S M Y <smy.altamash@gmail.com> Date: Thu, 29 Aug 2019 14:38:22 +0530 Subject: [PATCH] Remove files which are created by ownership of root in jenkins --- ansible/roles/cert-templates/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ansible/roles/cert-templates/tasks/main.yml b/ansible/roles/cert-templates/tasks/main.yml index 10e09bc5d..ae1f5160a 100644 --- a/ansible/roles/cert-templates/tasks/main.yml +++ b/ansible/roles/cert-templates/tasks/main.yml @@ -47,3 +47,14 @@ async: 60 poll: 10 +- name: list all the files + shell: "ls -lR {{cert_location}}" + register: allfiles + +- debug: + var: allfiles + +- name: Remove unwanted files + file: + path: "{{cert_location}}/cert-templates" + state: absent -- GitLab