summaryrefslogtreecommitdiff
path: root/per-service
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2016-11-08 16:19:31 +0000
committerBen Copeland <ben.copeland@linaro.org>2016-11-08 17:48:41 +0000
commit26e7d95a8116210de951e39b8938589c6474c813 (patch)
tree5bab5fe7bec49c1c5a0414f1627581a3c067602c /per-service
parent7477c28938de3782bee2187852120659bca4fc41 (diff)
downloadansible-playbooks-26e7d95a8116210de951e39b8938589c6474c813.tar.gz
gitolite: fix repo permissions
When we deploy a fresh git server, testing.git doesn't show up due to wrong permissions. Change-Id: I8140dcba57941ba49b9325922c935b3a092acd30 Reviewed-on: https://review.linaro.org/15377 Reviewed-by: Andy Doan <andy.doan@linaro.org>
Diffstat (limited to 'per-service')
-rw-r--r--per-service/git-servers/roles/gitolite/handlers/main.yml13
-rw-r--r--per-service/git-servers/roles/gitolite/tasks/gitolite-install.yml1
2 files changed, 9 insertions, 5 deletions
diff --git a/per-service/git-servers/roles/gitolite/handlers/main.yml b/per-service/git-servers/roles/gitolite/handlers/main.yml
index 39b3d63..52b4d88 100644
--- a/per-service/git-servers/roles/gitolite/handlers/main.yml
+++ b/per-service/git-servers/roles/gitolite/handlers/main.yml
@@ -1,6 +1,9 @@
-# Gitolite handlers.
-# Assumption is made that the gitolite command is installed in
-# /home/{{ git_user }}/bin.
+---
-- name: gitolite-setup
- command: sudo -u {{ git_user }} -H /home/{{ git_user }}/bin/gitolite setup
+- name: gitolite-repo
+ file: state=directory
+ path={{ repo_root }}
+ owner={{ git_user }}
+ group={{ git_user }}
+ mode=0755
+ recurse=yes \ No newline at end of file
diff --git a/per-service/git-servers/roles/gitolite/tasks/gitolite-install.yml b/per-service/git-servers/roles/gitolite/tasks/gitolite-install.yml
index a439b47..3f1a1e1 100644
--- a/per-service/git-servers/roles/gitolite/tasks/gitolite-install.yml
+++ b/per-service/git-servers/roles/gitolite/tasks/gitolite-install.yml
@@ -154,6 +154,7 @@
./gitolite setup -a {{ gitolite_admin_name }}
become: true
become_user: "{{git_user}}"
+ notify: gitolite-repo
when: hosttype == 'git-main'
tags:
- git