|
|
|
- hosts: all
|
|
|
|
vars:
|
|
|
|
dependencies:
|
|
|
|
- git
|
|
|
|
- stow
|
|
|
|
tasks:
|
|
|
|
- name: install dependencies with homebrew
|
|
|
|
homebrew: name={{ item }} state=present
|
|
|
|
with_items: dependencies
|
|
|
|
when: ansible_distribution == "MacOSX"
|
|
|
|
- name: install dependencies with apt
|
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items: dependencies
|
|
|
|
when: ansible_distribution == "Debian"
|
|
|
|
- hosts: all
|
|
|
|
vars:
|
|
|
|
stow_packages:
|
|
|
|
- config
|
|
|
|
- git
|
|
|
|
- pentadactyl
|
|
|
|
- ruby
|
|
|
|
- ssh
|
|
|
|
- tmux
|
|
|
|
- vim
|
|
|
|
tasks:
|
|
|
|
- name: clone/update 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
|
|
|
|
- name: setup ssh keys
|
|
|
|
local_action: command ruby ~/.dotfiles/scripts/setup_ssh_keys.rb
|
|
|
|
when: ansible_domain == "local"
|