---
 - name: install bash-completion
   apt: name=bash-completion state=present
 - name: create git directory
   file: path={{ local_home }}/git state=directory
 - name: remove dot files
   file: path={{ local_home }}/.{{ item }} state=absent
   with_items: "{{ dot_files }}"
 - name: link dot files
   file: src={{ role_path }}/files/{{ item }} dest={{ local_home }}/.{{ item }} state=link
   with_items: "{{ dot_files }}"
 - name: remove config files
   file: path={{ item.0 }}/{{ item.1 }} state=absent
   with_together:
     - "{{ config_paths }}"
     - "{{ config_files }}"
   tags:
     remove_config_files
 - name: make config directories
   file: path={{ item }} state=directory
   with_items: "{{ config_paths }}"
 - name: link config files
   file: src={{ role_path }}/files/{{ item.1 }} dest={{ item.0 }}/{{ item.1 }} state=link
   with_together:
     - "{{ config_paths }}"
     - "{{ config_files }}"
 - name: git-completion.bash
   get_url: url=https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash dest={{ local_home }}/.git-completion.bash
 - name: commit-template.txt
   file: src={{ role_path }}/files/commit-template.txt dest={{ local_home }}/.commit-template.txt state=link

---
 - name: install bash-completion
   apt: name=bash-completion state=present
   become: true
 - name: create git directory
   file: path={{ local_home }}/git state=directory
 - name: remove dot files
   file: path={{ local_home }}/.{{ item }} state=absent
   with_items: "{{ dot_files }}"
 - name: link dot files
   file: src={{ role_path }}/files/{{ item }} dest={{ local_home }}/.{{ item }} state=link
   with_items: "{{ dot_files }}"
 - name: remove config files
   file: path={{ item.0 }}/{{ item.1 }} state=absent
   with_together:
     - "{{ config_paths }}"
     - "{{ config_files }}"
   tags:
     remove_config_files
 - name: make config directories
   file: path={{ item }} state=directory
   with_items: "{{ config_paths }}"
 - name: link config files
   file: src={{ role_path }}/files/{{ item.1 }} dest={{ item.0 }}/{{ item.1 }} state=link
   with_together:
     - "{{ config_paths }}"
     - "{{ config_files }}"
 - name: git-completion.bash
   get_url: url=https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash dest={{ local_home }}/.git-completion.bash
 - name: commit-template.txt
   file: src={{ role_path }}/files/commit-template.txt dest={{ local_home }}/.commit-template.txt state=link

Fix sudo privileges for apt-get install
Fix sudo privileges for apt-get install
