---
- name: Install git
  apt: name={{ item }} state=present update_cache=yes
  with_items:
    - git

- name: Set git config file values
  template:
    src=.gitconfig
    dest=/home/{{ docker_dev_user }}
    owner={{ docker_dev_user }}
    group={{ docker_dev_user }}


---
- name: Install git
  apt: name={{ item }} state=present update_cache=yes
  with_items:
    - git

- name: Set git config file values
  template:
    src=.gitconfig
    dest=/home/{{ docker_dev_user }}
    owner={{ docker_dev_user }}
    group={{ docker_dev_user }}

- name: Add git-prompt and git-completions to user directory
  copy:
    src={{ item.src }}
    dest="/home/{{ docker_dev_user }}/{{ item.dest }}"
    owner={{ docker_dev_user }}
    group={{ docker_dev_user }}
  with_items:
    - src: /usr/lib/git-core/git-sh-prompt
      dest: .git-prompt.sh
    - src: /usr/share/bash-completion/completions/git
      dest: .git-completion.sh

- name: Add git-prompt and git-completions to bash_profile
  lineinfile:
    dest="/home/{{ docker_dev_user }}/.bash_profile"
    line="{{ item }}"
    owner={{ docker_dev_user }}
    group={{ docker_dev_user }}
    state=present
    create=yes
  with_items:
    - ". ~/.git-prompt.sh"
    - ". ~/.git-completion.sh"


Make git-prompt and git-completion available
Make git-prompt and git-completion available
