--- - yum: name={{ item }} state=installed with_items: - ansible - 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 - copy: dest={{ git_repositories_dir }}/{{ 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