diff options
-rw-r--r-- | roles/local_deploy/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/local_deploy/tasks/main.yml | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/roles/local_deploy/defaults/main.yml b/roles/local_deploy/defaults/main.yml new file mode 100644 index 0000000..cb1c653 --- /dev/null +++ b/roles/local_deploy/defaults/main.yml @@ -0,0 +1 @@ +git_repositories_dir: /srv/git_repos/ 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 |