From fd304d912f6b5087d7e9c5d9aef50603cbe1eae8 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sat, 13 Dec 2014 01:16:56 +0100 Subject: Split the git repositories in a separate role --- roles/git_repositories/tasks/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/git_repositories/tasks/main.yml (limited to 'roles') 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 + -- cgit