From e7fc28f43ff210574682445ba62239f840888b76 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 12 Dec 2014 11:54:55 +0100 Subject: Add the local deploy role --- roles/local_deploy/tasks/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 roles/local_deploy/tasks/main.yml (limited to 'roles/local_deploy/tasks/main.yml') diff --git a/roles/local_deploy/tasks/main.yml b/roles/local_deploy/tasks/main.yml new file mode 100644 index 0000000..b6f466e --- /dev/null +++ b/roles/local_deploy/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- yum: name={{ item }} state=installed + with_items: + - ansible + - git + +- shell: creates=/srv/git_repos/{{ item }}/config chdir=/srv/git_repos/{{ 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 + with_items: + - public + - private + + +- copy: src={{ item }} dest=/usr/local/bin/{{ item }} mode=0755 + with_items: + - ansible_run.sh + +- cron: name="ansible run" job="/usr/local/bin/ansible_run.sh" minute=*/30 -- cgit