
- set_fact: git_home=/srv/git
- user: name={{ git_username }} shell=/usr/bin/git-shell home={{ git_home }} group={{ ansible_admin_group | default(omit) }}

- file: name={{ git_home }}/git-shell-commands state=directory

- copy: dest={{ git_home }}/git-shell-commands/{{ item }} src={{ item }} mode=0755
  with_items:
  - list
  - help

- file: state=link dest={{ git_home }}/{{ item }}.git src={{ git_repositories_dir }}/{{ item }}
  with_items:
  - public
  - private


- set_fact: git_home=/srv/git

- name: Create user {{ git_username }}
  user: name={{ git_username }} shell=/usr/bin/git-shell home={{ git_home }} group={{ ansible_admin_group | default(omit) }}

- name: Create git-shell-commands directory
  file: name={{ git_home }}/git-shell-commands state=directory

- name: Copy commands
  copy: dest={{ git_home }}/git-shell-commands/{{ item }} src={{ item }} mode=0755
  with_items:
  - list
  - help

- name: Link repositories
  file: state=link dest={{ git_home }}/{{ item }}.git src={{ git_repositories_dir }}/{{ item }}
  with_items:
  - public
  - private

Add name to the various command, for ansible 2.0 compatbility
Add name to the various command, for ansible 2.0 compatbility
