From 60e43ac4497dee75f86c073ee5f5e2fb210d381d Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 12 Dec 2014 13:58:00 +0100 Subject: Fix missing directory creation, and add a variable for that along default value --- roles/local_deploy/tasks/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'roles/local_deploy/tasks') diff --git a/roles/local_deploy/tasks/main.yml b/roles/local_deploy/tasks/main.yml index b6f466e..e7ee0a4 100644 --- a/roles/local_deploy/tasks/main.yml +++ b/roles/local_deploy/tasks/main.yml @@ -4,12 +4,19 @@ - ansible - git -- shell: creates=/srv/git_repos/{{ item }}/config chdir=/srv/git_repos/{{ item }} git init --bare -q --shared=group +- 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 -- copy: dest=/srv/git_repos/{{ item }}/hooks/post-receive src=post-receive.{{ item }}.sh mode=0755 +- copy: dest={{ git_repositories_dir }}/{{ item }}/hooks/post-receive src=post-receive.{{ item }}.sh mode=0755 with_items: - public - private -- cgit