--- - 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 - group: name: "{{ item.group | default(git_default_group) }}" state: present with_items: git_repositories - file: path: "{{ git_repositories_dir }}/{{ item.name }}" state: directory mode: "{% if item.private is defined and item.private %}750{% else %}755{% endif %}" group: "{{ item.group | default(git_default_group) }}" with_items: git_repositories - shell: creates={{ git_repositories_dir }}/{{ item.name }}/config chdir={{ git_repositories_dir }}/{{ item.name }} git init --bare -q --shared=group with_items: git_repositories - file: path: "{{ git_repositories_dir }}/{{ item.name }}/git-daemon-export-ok" state: "{% if item.private is defined and item.private %}absent{% else %}touch{% endif %}" with_items: git_repositories - template: dest: "{{ git_repositories_dir }}/{{ item.name }}/description" content: "{{ item.desc }}" with_items: git_repositories