---

- name: Synchronize Dotfile Repository
  git: repo={{ dotfiles_repository }}
     dest={{ dotfiles_repository_destination }}
     recursive=yes
     accept_hostkey=yes

- name: Linking Dotfiles
  file: state=link src={{ item }} 
    dest={{ ansible_env.HOME }}/{{ item | basename }} 
  with_lines: 
      test -e {{ dotfiles_repository_destination }}
      && find {{ dotfiles_repository_destination }}
      -depth 1 
      -and \( -type f -or -type d -or -type l \)
      -and -name ".*" 
      -and ! \(
          -name ".DS_Store" 
          -or -name ".git"  
          -or -name ".gitignore"  
          -or -name ".gitmodules"  
      \)
      || true


---

- name: Synchronize Dotfile Repository
  git: repo={{ dotfiles_repository }}
     dest={{ dotfiles_repository_destination }}
     recursive=yes
     accept_hostkey=yes

- name: Linking Dotfiles
  file: state=link src={{ item }} 
    dest={{ ansible_env.HOME }}/{{ item | basename }} 
    force=yes
  with_lines: 
      test -e {{ dotfiles_repository_destination }}
      && find {{ dotfiles_repository_destination }}
      -depth 1 
      -and \( -type f -or -type d -or -type l \)
      -and -name ".*" 
      -and ! \(
          -name ".DS_Store" 
          -or -name ".git"  
          -or -name ".gitignore"  
          -or -name ".gitmodules"  
      \)
      || true


Set dotfile symlinking to force. Else symlinks without target are not symlinked. Disadvantage, existings files are overwritten. Consider backup before.
Set dotfile symlinking to force. Else symlinks without target are not symlinked. Disadvantage, existings files are overwritten. Consider backup before.
