Get initial dotfiles stowing to work

pull/28/head
Alpha Chen 10 years ago
parent e6be574d34
commit 45facedb42

@ -1,28 +1,34 @@
- hosts: all - hosts: all
tasks: tasks:
- group_by: key={{ ansible_distribution }} - group_by: key={{ ansible_distribution }}
- hosts: MacOSX - hosts: MacOSX
gather_facts: false gather_facts: false
tasks: tasks:
- name: install dependencies - name: install dependencies
homebrew: name={{ item }} state=present homebrew: name={{ item }} state=present
with_items: with_items:
- git - git
- stow - stow
- hosts: Debian - hosts: Debian
gather_facts: false gather_facts: false
tasks: tasks:
- name: install dependencies - name: install dependencies
apt: pkg={{ item }} state=present apt: pkg={{ item }} state=present
with_items: with_items:
- git - git
- stow - stow
- hosts: all - hosts: all
gather_facts: false gather_facts: false
vars:
stow_packages:
- git
tasks: tasks:
- name: clone dotfiles - name: clone dotfiles
git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles
- name: stow files - name: stow files
command: stow --target={{ ansible_env.HOME }} --stow {{ ansible_env.HOME }}/.dotfiles/{{ item }} command: chdir={{ ansible_env.HOME }}/.dotfiles stow --target={{ ansible_env.HOME }} --stow {{ item }}
with_items: with_items: stow_packages
- git - 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

Loading…
Cancel
Save