Make everything actually work. Another monolithic commit.
This commit is contained in:
parent
c014d21aa4
commit
8e7f70ff00
10
README.md
10
README.md
@ -6,6 +6,12 @@ This is very much a work in progress, and is mostly a means for me to document m
|
|||||||
|
|
||||||
**Caveat**: This set of playbooks is not meant to be a great example of Ansible best practices. I just want to wrap my Mac's configuration in Ansible so I can quickly bring up a new development Mac without having to restore from a Time Machine backup.
|
**Caveat**: This set of playbooks is not meant to be a great example of Ansible best practices. I just want to wrap my Mac's configuration in Ansible so I can quickly bring up a new development Mac without having to restore from a Time Machine backup.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Clone this repository somewhere.
|
||||||
|
2. Install Ansible.
|
||||||
|
3. Run `ansible-playbook main.yml --ask-sudo-pass`.
|
||||||
|
|
||||||
## Additions coming soon
|
## Additions coming soon
|
||||||
|
|
||||||
### General changes:
|
### General changes:
|
||||||
@ -16,11 +22,15 @@ This is very much a work in progress, and is mostly a means for me to document m
|
|||||||
|
|
||||||
- Cornerstone SVN
|
- Cornerstone SVN
|
||||||
- Tower (Git)
|
- Tower (Git)
|
||||||
|
- MenuMeters
|
||||||
|
- nvAlt
|
||||||
- PCKeyboardHack
|
- PCKeyboardHack
|
||||||
|
- My dotfiles
|
||||||
- etc...
|
- etc...
|
||||||
|
|
||||||
### Settings to be added:
|
### Settings to be added:
|
||||||
|
|
||||||
|
- Terminal theme (Jeff's OSX)
|
||||||
- Sublime text settings/package manager
|
- Sublime text settings/package manager
|
||||||
- Keyboard remappings (Caps Lock -> escape)
|
- Keyboard remappings (Caps Lock -> escape)
|
||||||
- Faster key repeat rates
|
- Faster key repeat rates
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: Google\ Chrome
|
app_name: Google\ Chrome
|
||||||
app_name_pretty: Google Chrome
|
app_name_pretty: Google Chrome
|
||||||
@ -8,8 +8,7 @@
|
|||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
mount_path: /Volumes/Google\ Chrome/
|
mount_path: /Volumes/Google\ Chrome/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: Firefox
|
app_name: Firefox
|
||||||
app_name_pretty: Firefox
|
app_name_pretty: Firefox
|
||||||
@ -8,8 +8,7 @@
|
|||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
mount_path: /Volumes/Firefox/
|
mount_path: /Volumes/Firefox/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: HandBrake
|
app_name: HandBrake
|
||||||
app_name_pretty: HandBrake
|
app_name_pretty: HandBrake
|
||||||
@ -8,8 +8,7 @@
|
|||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
mount_path: /Volumes/HandBrake-0.9.9-MacOSX.6_GUI_x86_64/
|
mount_path: /Volumes/HandBrake-0.9.9-MacOSX.6_GUI_x86_64/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,10 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
gather_facts: false
|
|
||||||
vars_files:
|
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- name: Run Homebrew install script
|
- name: Run Homebrew install script
|
||||||
shell: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
|
shell: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
|
||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: Sequel\ Pro
|
app_name: Sequel\ Pro
|
||||||
app_name_pretty: Sequel Pro
|
app_name_pretty: Sequel Pro
|
||||||
@ -8,8 +8,7 @@
|
|||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
mount_path: /Volumes/Sequel\ Pro\ 1.0.2/
|
mount_path: /Volumes/Sequel\ Pro\ 1.0.2/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: Sublime\ Text
|
app_name: Sublime\ Text
|
||||||
app_name_pretty: Sublime\ Text
|
app_name_pretty: Sublime\ Text
|
||||||
@ -8,12 +8,13 @@
|
|||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
mount_path: /Volumes/Sublime\ Text/
|
mount_path: /Volumes/Sublime\ Text/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
- name: Create symlink subl for Sublime Text's subl command
|
- name: Create symlink subl for Sublime Text's subl command
|
||||||
file: src=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl dest=/usr/bin/subl state=link
|
file: src=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl dest=/usr/bin/subl state=link
|
||||||
|
sudo: true
|
||||||
- name: Create symlink sublime for Sublime Text's subl command
|
- name: Create symlink sublime for Sublime Text's subl command
|
||||||
file: src=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl dest=/usr/bin/sublime state=link
|
file: src=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl dest=/usr/bin/sublime state=link
|
||||||
|
sudo: true
|
||||||
@ -1,14 +1,13 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: Transmit
|
app_name: Transmit
|
||||||
app_name_pretty: Transmit
|
app_name_pretty: Transmit
|
||||||
app_url: "http://download.panic.com/transmit/Transmit%204.4.6.zip"
|
app_url: "http://download.panic.com/transmit/Transmit%204.4.6.zip"
|
||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: zip
|
install_method: zip
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,16 +1,15 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: Vagrant
|
app_name: Vagrant
|
||||||
app_name_pretty: Vagrant
|
app_name_pretty: Vagrant
|
||||||
app_url: "https://dl.bintray.com/mitchellh/vagrant/Vagrant-1.4.3.dmg"
|
app_url: "https://dl.bintray.com/mitchellh/vagrant/Vagrant-1.4.3.dmg"
|
||||||
installer_type: pkg
|
installer_type: pkg
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
install_target: /Volumes/OSX
|
install_target: /Volumes/Macintosh\ HD
|
||||||
mount_path: /Volumes/Vagrant/
|
mount_path: /Volumes/Vagrant/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
- include: ../install/{{ install_method }}.pkg
|
|
||||||
@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
- include: ../setup.yml
|
- hosts: all
|
||||||
|
connection: local
|
||||||
- hosts: {{ hosts }}
|
|
||||||
user: {{ user }}
|
|
||||||
vars:
|
vars:
|
||||||
app_name: VirtualBox
|
app_name: VirtualBox
|
||||||
app_name_pretty: VirtualBox
|
app_name_pretty: VirtualBox
|
||||||
@ -10,8 +8,8 @@
|
|||||||
mount_path: /Volumes/VirtualBox/
|
mount_path: /Volumes/VirtualBox/
|
||||||
installer_type: pkg
|
installer_type: pkg
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
install_target: /Volumes/OSX
|
install_target: /Volumes/Macintosh\ HD
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: {{ hosts }}
|
- hosts: all
|
||||||
user: {{ user }}
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
app_name: VLC
|
app_name: VLC
|
||||||
app_name_pretty: VLC
|
app_name_pretty: VLC
|
||||||
@ -8,8 +8,7 @@
|
|||||||
installer_type: app
|
installer_type: app
|
||||||
install_method: dmg
|
install_method: dmg
|
||||||
mount_path: /Volumes/vlc-2.1.3/
|
mount_path: /Volumes/vlc-2.1.3/
|
||||||
vars_files:
|
downloads: ~/.ansible-downloads/
|
||||||
- ../setup-vars.yml
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: ../setup.yml
|
|
||||||
- include: ../install/{{ install_method }}.yml
|
- include: ../install/{{ install_method }}.yml
|
||||||
@ -1,5 +1,3 @@
|
|||||||
---
|
---
|
||||||
- name: Remove existing app if present
|
|
||||||
file: path=/Applications/{{ app_name }}.app state=absent
|
|
||||||
- name: Copy {{ app_name_pretty }} app to Applications directory
|
- name: Copy {{ app_name_pretty }} app to Applications directory
|
||||||
command: cp -R {{ app_name }}.app /Applications chdir={{ downloads }}
|
command: cp -R {{ app_name }}.app /Applications chdir={{ downloads }} creates=/Applications/{{ app_name }}.app
|
||||||
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
- name: Download {{ app_name_pretty }}
|
- name: Download {{ app_name_pretty }}
|
||||||
get_url: url={{ app_url }} dest={{ downloads }}/{{ app_name }}.dmg
|
get_url: url={{ app_url }} dest={{ downloads }}/{{ app_name }}.dmg
|
||||||
|
# TODO: Idempotence.
|
||||||
- name: Mount {{ app_name_pretty }} image
|
- name: Mount {{ app_name_pretty }} image
|
||||||
command: hdiutil attach {{ app_name }}.dmg chdir={{ downloads }}
|
command: hdiutil attach {{ app_name }}.dmg chdir={{ downloads }}
|
||||||
- name: Remove existing app if present
|
|
||||||
file: path=/Applications/{{ app_name }}.app state=absent
|
|
||||||
when_string: {{ installer_type }} == 'app'
|
|
||||||
- name: Copy {{ app_name_pretty }} app to Applications directory
|
- name: Copy {{ app_name_pretty }} app to Applications directory
|
||||||
command: cp -R {{ mount_path }}{{ app_name }}.app /Applications
|
command: cp -R {{ mount_path }}{{ app_name }}.app /Applications creates=/Applications/{{ app_name }}.app
|
||||||
when_string: {{ installer_type }} == 'app'
|
when: "installer_type == 'app'"
|
||||||
- name: Install {{ app_name_pretty }} pkg
|
- name: Install {{ app_name_pretty }} pkg
|
||||||
command: sudo installer -package {{ mount_path }}{{ app_name }}.pkg -target {{ install_target }}
|
command: installer -package {{ mount_path }}{{ app_name }}.pkg -target {{ install_target }}
|
||||||
when_string: {{ installer_type }} == 'pkg'
|
sudo: yes
|
||||||
|
when: "installer_type == 'pkg'"
|
||||||
|
# TODO: Idempotence.
|
||||||
- name: Unmount {{ app_name_pretty }} image
|
- name: Unmount {{ app_name_pretty }} image
|
||||||
command: hdiutil detach {{ mount_path }}
|
command: hdiutil detach {{ mount_path }}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
# TODO: Idempotence.
|
||||||
- name: Install {{ app_name }} pkg
|
- name: Install {{ app_name }} pkg
|
||||||
command: sudo installer -package {{ app_name }}.pkg -target {{ install_target }}
|
command: sudo installer -package {{ app_name }}.pkg -target {{ install_target }}
|
||||||
@ -9,12 +9,12 @@
|
|||||||
command: tar xf {{ app_name }}.tar -C {{ app_name }}/ chdir={{ downloads }}
|
command: tar xf {{ app_name }}.tar -C {{ app_name }}/ chdir={{ downloads }}
|
||||||
- name: Remove existing app if present
|
- name: Remove existing app if present
|
||||||
file: path=/Applications/{{ app_name }}.app state=absent
|
file: path=/Applications/{{ app_name }}.app state=absent
|
||||||
when_string: {{ installer_type }} == 'app'
|
when: "installer_type == 'app'"
|
||||||
- name: Copy {{ app_name_pretty }} app to Applications directory
|
- name: Copy {{ app_name_pretty }} app to Applications directory
|
||||||
command: cp -R {{ app_name }}/{{ app_name }}.app /Applications chdir={{ downloads }}
|
command: cp -R {{ app_name }}/{{ app_name }}.app /Applications chdir={{ downloads }}
|
||||||
when_string: {{ installer_type }} == 'app'
|
when: "installer_type == 'app'"
|
||||||
- name: Install {{ app_name_pretty }} pkg
|
- name: Install {{ app_name_pretty }} pkg
|
||||||
command: sudo installer -package {{ app_name }}/{{ app_name }}.pkg -target {{ install_target }} chdir={{ downloads }}
|
command: sudo installer -package {{ app_name }}/{{ app_name }}.pkg -target {{ install_target }} chdir={{ downloads }}
|
||||||
when_string: {{ installer_type }} == 'pkg'
|
when: "installer_type == 'pkg'"
|
||||||
- name: Remove extraction directory
|
- name: Remove extraction directory
|
||||||
file: path={{ downloads }}{{ app_name }}/ state=absent
|
file: path={{ downloads }}{{ app_name }}/ state=absent
|
||||||
@ -9,12 +9,12 @@
|
|||||||
command: unzip {{ app_name }}.zip -d {{ app_name }}/ chdir={{ downloads }}
|
command: unzip {{ app_name }}.zip -d {{ app_name }}/ chdir={{ downloads }}
|
||||||
- name: Remove existing app if present
|
- name: Remove existing app if present
|
||||||
file: path=/Applications/{{ app_name }}.app state=absent
|
file: path=/Applications/{{ app_name }}.app state=absent
|
||||||
when_string: {{ installer_type }} == 'app'
|
when: "installer_type == 'app'"
|
||||||
- name: Copy {{ app_name_pretty }} app to Applications directory
|
- name: Copy {{ app_name_pretty }} app to Applications directory
|
||||||
command: cp -R {{ app_name }}/{{ app_name }}.app /Applications chdir={{ downloads }}
|
command: cp -R {{ app_name }}/{{ app_name }}.app /Applications chdir={{ downloads }}
|
||||||
when_string: {{ installer_type }} == 'app'
|
when: "installer_type == 'app'"
|
||||||
- name: Install {{ app_name_pretty }} pkg
|
- name: Install {{ app_name_pretty }} pkg
|
||||||
command: sudo installer -package {{ app_name }}/{{ app_name }}.pkg -target {{ install_target }} chdir={{ downloads }}
|
command: sudo installer -package {{ app_name }}/{{ app_name }}.pkg -target {{ install_target }} chdir={{ downloads }}
|
||||||
when_string: {{ installer_type }} == 'pkg'
|
when: "installer_type == 'pkg'"
|
||||||
- name: Remove extraction directory
|
- name: Remove extraction directory
|
||||||
file: path={{ downloads }}{{ app_name }}/ state=absent
|
file: path={{ downloads }}{{ app_name }}/ state=absent
|
||||||
12
main.yml
12
main.yml
@ -1,4 +1,16 @@
|
|||||||
---
|
---
|
||||||
|
- name: Mac Development Playbook
|
||||||
|
hosts: self
|
||||||
|
user: jgeerling
|
||||||
|
connection: local
|
||||||
|
|
||||||
|
vars:
|
||||||
|
- downloads: ~/.ansible-downloads/
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Create Ansible downloads directory
|
||||||
|
file: path={{ downloads }} state=directory
|
||||||
|
|
||||||
- include: apps/chrome.yml
|
- include: apps/chrome.yml
|
||||||
- include: apps/firefox.yml
|
- include: apps/firefox.yml
|
||||||
- include: apps/handbrake.yml
|
- include: apps/handbrake.yml
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
downloads: /.ansible-downloads/
|
|
||||||
Loading…
x
Reference in New Issue
Block a user