summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
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
+