From 520f8a6059c4416ce7ee10dc88fab6274b6511e2 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Thu, 7 Sep 2017 12:49:02 -0400 Subject: [PATCH] Fixes for fetch-zuul-cloner Remove the delegate-to, use elevated privs, and add new task to make sure the destination directory exists. Change-Id: I258d39afd77dd090198456950d873c99f98dbda7 --- roles/fetch-zuul-cloner/tasks/main.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/fetch-zuul-cloner/tasks/main.yaml b/roles/fetch-zuul-cloner/tasks/main.yaml index 6ef2b806b..f7432ed0e 100644 --- a/roles/fetch-zuul-cloner/tasks/main.yaml +++ b/roles/fetch-zuul-cloner/tasks/main.yaml @@ -1,10 +1,17 @@ +- name: Create zuul-cloner destination directory + file: + path: "{{ destination | dirname }}" + state: directory + become: yes + - name: Install zuul-cloner shim - delegate_to: localhost template: src: templates/zuul-cloner-shim.py.j2 dest: "{{ destination }}" + become: yes - name: Change zuul-cloner permissions file: path: "{{ destination }}" mode: 0755 + become: yes