From 45facedb428f1ceef709affd4d9b764611aeaa75 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 12 Jun 2014 18:27:00 -0700 Subject: [PATCH] Get initial dotfiles stowing to work --- ansible/config.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/ansible/config.yml b/ansible/config.yml index fa2e09a..c7a24a4 100644 --- a/ansible/config.yml +++ b/ansible/config.yml @@ -1,28 +1,34 @@ - hosts: all tasks: - - group_by: key={{ ansible_distribution }} + - group_by: key={{ ansible_distribution }} - hosts: MacOSX gather_facts: false tasks: - - name: install dependencies - homebrew: name={{ item }} state=present - with_items: - - git - - stow + - name: install dependencies + homebrew: name={{ item }} state=present + with_items: + - git + - stow - hosts: Debian gather_facts: false tasks: - name: install dependencies apt: pkg={{ item }} state=present with_items: - - git - - stow + - git + - stow - hosts: all gather_facts: false + vars: + stow_packages: + - git tasks: - - name: clone dotfiles - git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles - - name: stow files - command: stow --target={{ ansible_env.HOME }} --stow {{ ansible_env.HOME }}/.dotfiles/{{ item }} - with_items: - - git + - name: clone dotfiles + git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles + - name: stow files + command: chdir={{ ansible_env.HOME }}/.dotfiles stow --target={{ ansible_env.HOME }} --stow {{ item }} + with_items: stow_packages + - name: link unstowable files + file: src={{ ansible_env.HOME }}/.dotfiles/{{ item.key }} dest={{ ansible_env.HOME}}/{{ item.value }} state=link + with_dict: + git/.gitignore: .gitignore