mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-22 03:43:06 +00:00
38 lines
928 B
YAML
38 lines
928 B
YAML
---
|
|
# Install Jeff Geerling's dotfiles.
|
|
- name: Clone dotfiles repository (if it doesn't already exist).
|
|
git:
|
|
repo: https://github.com/geerlingguy/dotfiles.git
|
|
dest: ~/Dropbox/Development/GitHub/dotfiles
|
|
sudo: no
|
|
|
|
- name: Check if .bash_profile is a link.
|
|
shell: ls -F ~/.bash_profile
|
|
register: is_link
|
|
failed_when: false
|
|
always_run: yes
|
|
changed_when: false
|
|
|
|
- name: Remove current .bash_profile file if necessary.
|
|
file:
|
|
path: ~/.bash_profile
|
|
state: absent
|
|
when: "'@' not in is_link.stdout"
|
|
|
|
- name: Link dotfiles into home folder.
|
|
file:
|
|
src: "~/Dropbox/Development/GitHub/dotfiles/{{ item }}"
|
|
dest: "~/{{ item }}"
|
|
state: link
|
|
sudo: no
|
|
with_items:
|
|
- .bash_profile
|
|
- .gitignore
|
|
- .inputrc
|
|
- .osx
|
|
- .vimrc
|
|
|
|
# TODO: Use sudo once .osx can be run via root with no user interaction.
|
|
- name: Run .osx dotfiles.
|
|
shell: ~/.osx --no-restart
|
|
changed_when: false
|