summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2014-12-13 01:16:56 +0100
committerMichael Scherer <misc@zarb.org>2014-12-13 01:16:56 +0100
commitfd304d912f6b5087d7e9c5d9aef50603cbe1eae8 (patch)
tree7c43f9a8028b47e5997782363ecdfa7a3cf58d9c /roles
parentba0db2348da83c4cc1192f94956c238c53edbb27 (diff)
Split the git repositories in a separate role
Diffstat (limited to 'roles')
-rw-r--r--roles/git_repositories/tasks/main.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/git_repositories/tasks/main.yml b/roles/git_repositories/tasks/main.yml
new file mode 100644
index 0000000..b6bc396
--- /dev/null
+++ b/roles/git_repositories/tasks/main.yml
@@ -0,0 +1,19 @@
+---
+- yum: name={{ item }} state=installed
+ with_items:
+ - git
+
+- command: semanage fcontext -t git_user_content_t -a '{{ git_repositories_dir }}(/.*)?'
+
+- file: path={{ git_repositories_dir }} state=directory
+
+- file: path={{ git_repositories_dir }}/{{ item }} state=directory
+ with_items:
+ - public
+ - private
+
+- shell: creates={{ git_repositories_dir }}/{{ item }}/config chdir={{ git_repositories_dir }}/{{ item }} git init --bare -q --shared=group
+ with_items:
+ - public
+ - private
+