From 8424152805a694af02747b212da14a3c8b7e9c9e Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 5 Jan 2015 16:16:58 -0800 Subject: [PATCH] [meta] More fixing up of osx and dotfiles roles --- ansible/roles/bootstrap/tasks/main.yml | 1 + ansible/roles/dotfiles/tasks/dotfiles.yml | 6 ++++++ ansible/roles/dotfiles/tasks/main.yml | 2 -- ansible/roles/dotfiles/tasks/powerline.yml | 4 +++- ansible/roles/dotfiles/tasks/ssh.yml | 7 ------- ansible/roles/dotfiles/vars/main.yml | 5 +++-- ansible/roles/osx/tasks/main.yml | 11 ++++++----- .../roles/osx/files => osx}/DefaultKeyBinding.dict | 0 8 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 ansible/roles/dotfiles/tasks/ssh.yml rename {ansible/roles/osx/files => osx}/DefaultKeyBinding.dict (100%) diff --git a/ansible/roles/bootstrap/tasks/main.yml b/ansible/roles/bootstrap/tasks/main.yml index b53acfe..fc1ac43 100644 --- a/ansible/roles/bootstrap/tasks/main.yml +++ b/ansible/roles/bootstrap/tasks/main.yml @@ -4,6 +4,7 @@ recursive: yes dest: ~/.dotfiles force: no + ignore_errors: True - name: no-op so that sudo works in Homebrew later ping: sudo: True diff --git a/ansible/roles/dotfiles/tasks/dotfiles.yml b/ansible/roles/dotfiles/tasks/dotfiles.yml index f463eb9..c965126 100644 --- a/ansible/roles/dotfiles/tasks/dotfiles.yml +++ b/ansible/roles/dotfiles/tasks/dotfiles.yml @@ -5,5 +5,11 @@ - ~/.ssh - file: src=~/.dotfiles/{{ item.key }} dest={{ item.value }} state=link with_dict: dotfiles +- file: + src: ~/Dropbox/dotfiles/{{ item.key }} + dest: "{{ item.value }}" + state: link + force: yes # Since these won't exist until later. + with_dict: private - file: src=~/.dotfiles/.ssh/{{ item }} dest=~/.ssh/{{ item }} state=link with_lines: ls ~/.dotfiles/.ssh diff --git a/ansible/roles/dotfiles/tasks/main.yml b/ansible/roles/dotfiles/tasks/main.yml index adbad57..e4d2a39 100644 --- a/ansible/roles/dotfiles/tasks/main.yml +++ b/ansible/roles/dotfiles/tasks/main.yml @@ -1,6 +1,4 @@ --- - include: dotfiles.yml - tags: dotfiles - include: powerline.yml - include: zsh.yml -- include: ssh.yml diff --git a/ansible/roles/dotfiles/tasks/powerline.yml b/ansible/roles/dotfiles/tasks/powerline.yml index 62b107c..a6c3c53 100644 --- a/ansible/roles/dotfiles/tasks/powerline.yml +++ b/ansible/roles/dotfiles/tasks/powerline.yml @@ -7,4 +7,6 @@ - python - python-pip when: ansible_os_family == "Debian" -- command: pip install --user --editable=~/.dotfiles/src/powerline +- command: > + /usr/local/bin/pip install --user + --editable={{ ansible_env.HOME }}/.dotfiles/src/powerline diff --git a/ansible/roles/dotfiles/tasks/ssh.yml b/ansible/roles/dotfiles/tasks/ssh.yml deleted file mode 100644 index 0a3274c..0000000 --- a/ansible/roles/dotfiles/tasks/ssh.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- command: > - chdir={{ ansible_env.HOME }}/.dotfiles - stow --stow --target={{ ansible_env.HOME }} --no-folding ssh - tags: stow -# - local_action: command ruby scripts/setup_ssh_keys.rb -# when: ansible_domain == "local" diff --git a/ansible/roles/dotfiles/vars/main.yml b/ansible/roles/dotfiles/vars/main.yml index 6dcb4eb..6a777a2 100644 --- a/ansible/roles/dotfiles/vars/main.yml +++ b/ansible/roles/dotfiles/vars/main.yml @@ -1,10 +1,8 @@ dotfiles: gitignore: ~/.gitignore .bundle/config: ~/.bundle/config - .config: ~/.config .gemrc: ~/.gemrc .git_templates: ~/.git_templates - .gitconfig.private: ~/.gitconfig.private .gitconfig: ~/.gitconfig .hammerspoon: ~/.hammerspoon # .pentadactyl: ~/.pentadactyl @@ -13,3 +11,6 @@ dotfiles: .tmux.conf: ~/.tmux.conf .vim: ~/.vim .vimrc: ~/.vimrc +private: + .config: ~/.config + .gitconfig.private: ~/.gitconfig.private diff --git a/ansible/roles/osx/tasks/main.yml b/ansible/roles/osx/tasks/main.yml index 267eea6..ac2c26d 100644 --- a/ansible/roles/osx/tasks/main.yml +++ b/ansible/roles/osx/tasks/main.yml @@ -6,9 +6,10 @@ - include: fonts.yml - include: defaults.yml -- file: src=~/.dotfiles/osx/.tmux.conf.local dest=~/.tmux.conf.local state=link - -# - file: path=~/Library/KeyBindings state=directory -# - copy: src=DefaultKeyBinding.dict dest=~/Library/KeyBindings/DefaultKeyBinding.dict +- file: path=~/Library/KeyBindings state=directory +- file: + src: ../osx/DefaultKeyBinding.dict + dest: ~/Library/KeyBindings/DefaultKeyBinding.dict -# - command: open ~/.dotfiles/Alpha.terminal +# TODO This should probably be moved to the dotfiles role. +- file: src=~/.dotfiles/osx/.tmux.conf.local dest=~/.tmux.conf.local state=link diff --git a/ansible/roles/osx/files/DefaultKeyBinding.dict b/osx/DefaultKeyBinding.dict similarity index 100% rename from ansible/roles/osx/files/DefaultKeyBinding.dict rename to osx/DefaultKeyBinding.dict