From 1253d3da37ec082f04c042dede3c990f170eb8dd Mon Sep 17 00:00:00 2001
From: Monty Taylor <mordred@inaugust.com>
Date: Mon, 16 Oct 2017 07:48:44 -0500
Subject: [PATCH] Make git repos writable so that hard links work

When people try to zuul-cloner from not zuul user, it fails with making
hard links. We can prevent the hard linking - or we can just make them
writable.

Change-Id: If0601116c8f3b3db2a43d77f7c609ab7f2330e80
---
 roles/fetch-zuul-cloner/tasks/main.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/roles/fetch-zuul-cloner/tasks/main.yaml b/roles/fetch-zuul-cloner/tasks/main.yaml
index f7432ed0e..eec70aa02 100644
--- a/roles/fetch-zuul-cloner/tasks/main.yaml
+++ b/roles/fetch-zuul-cloner/tasks/main.yaml
@@ -15,3 +15,11 @@
     path: "{{ destination }}"
     mode: 0755
   become: yes
+
+- name: Make repositories writable so that people can hardlink
+  file:
+    path: "{{ ansible_user_dir }}/src"
+    state: directory
+    recurse: yes
+    mode: ugo+rw
+  become: yes