mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-10 06:14:12 +00:00
Use geerlingguy.dotfiles role instead of a bunch of custom tasks.
This commit is contained in:
parent
d62d466f0b
commit
e9c062766a
4 changed files with 16 additions and 39 deletions
7
main.yml
7
main.yml
|
@ -8,8 +8,13 @@
|
|||
|
||||
roles:
|
||||
- geerlingguy.homebrew
|
||||
- geerlingguy.dotfiles
|
||||
|
||||
tasks:
|
||||
- include: tasks/ansible-setup.yml
|
||||
- include: tasks/dotfiles.yml
|
||||
- include: tasks/preferences.yml
|
||||
|
||||
# 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
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
geerlingguy.dotfiles
|
||||
geerlingguy.homebrew
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
---
|
||||
# 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
|
|
@ -1,6 +1,15 @@
|
|||
---
|
||||
downloads: ~/.ansible-downloads/
|
||||
|
||||
dotfiles_repo: https://github.com/geerlingguy/dotfiles.git
|
||||
dotfiles_repo_local_destination: ~/Dropbox/Development/GitHub/dotfiles
|
||||
dotfiles_files:
|
||||
- .bash_profile
|
||||
- .gitignore
|
||||
- .inputrc
|
||||
- .osx
|
||||
- .vimrc
|
||||
|
||||
homebrew_installed_packages:
|
||||
- ansible
|
||||
- autoconf
|
||||
|
|
Loading…
Reference in a new issue