From 1f706af8b8a68c30a6e318c20e4da8e7428cd94a Mon Sep 17 00:00:00 2001 From: thelamer Date: Tue, 18 Dec 2018 17:39:51 -0800 Subject: [PATCH] adding a chmod command to template genration to ensure build hosts can clear out files --- roles/generate-jenkins/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/generate-jenkins/tasks/main.yml b/roles/generate-jenkins/tasks/main.yml index 537c053a..b192c509 100644 --- a/roles/generate-jenkins/tasks/main.yml +++ b/roles/generate-jenkins/tasks/main.yml @@ -30,3 +30,9 @@ src: ../templates/Jenkinsfile.j2 dest: "/tmp/GENERATED.Jenkinsfile" delegate_to: localhost + +- name: Allow non root host to delete temp files + when: + - lookup('env', 'LOCAL') != "true" + command: chmod -R 777 /ansible/jenkins + delegate_to: localhost