Use creates, add cornerstone, menumeters, nvalt, tower, adium.

This commit is contained in:
Jeff Geerling 2014-02-13 08:37:53 -06:00
parent 8d22729921
commit 724f9a1cf3
20 changed files with 153 additions and 22 deletions

View File

@ -16,16 +16,18 @@ This is very much a work in progress, and is mostly a means for me to document m
### General changes:
- Fix TODOs (idempotence, mostly)
- Fix TODOs (idempotence, mostly - maybe just pass in a 'creates' variable)
### Applications/packages to be added:
- Cornerstone SVN
- Tower (Git)
- MenuMeters
- nvAlt
- [MacVim](https://github.com/b4winckler/macvim/releases/download/snapshot-72/MacVim-snapshot-72-Mavericks.tbz)
- iShowU HD
- [MenuMeters](http://www.ragingmenace.com/software/menumeters/)
- TextMate 2
- PCKeyboardHack
- My dotfiles
- TimeMachineEditor
- Skype
- etc...
### Settings to be added:
@ -43,6 +45,26 @@ This is very much a work in progress, and is mostly a means for me to document m
- Show hard disks, connected servers on desktop
- etc...
### Apps only available via the App Store
I also use the following apps at least once or twice per week, but unfortunately, as the Mac App Store is not able to be controlled via CLI, or any other way I can find (so far), I have to manually install all of these apps from within the App Store application.
- Tweetbot
- RadarScope
- Pixelmator
- Skitch
- Quick Resizer
- Knock
- 1Password
- DaisyDisk
- Byword
- Aperture
- Pages
- Keynote
- Numbers
There are a couple other apps I'm leaving out of the list, like Microsoft Word, because I normally don't install them unless I need them; unfortunately, about once a year, I get a document that's so old/strange that I need Word or Powerpoint to open the file.
## Ansible for DevOps
If Ansible piques your interest, please check out the book I'm working on, [Ansible for DevOps](https://leanpub.com/ansible-for-devops), where I actually *do* follow Ansible best practices, and will teach you how to do some other amazing things with Ansible.

15
apps/adium.yml Normal file
View File

@ -0,0 +1,15 @@
---
- hosts: all
connection: local
vars:
app_name: Adium
app_name_pretty: Adium
app_url: "http://downloads.sourceforge.net/project/adium/Adium_1.5.9.dmg?r=&ts=1392301195&use_mirror=softlayer-ams"
installer_type: app
install_method: dmg
mount_path: /Volumes/Adium\ 1.5.9/
creates: /Applications/Adium.app
downloads: ~/.ansible-downloads/
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -8,6 +8,7 @@
installer_type: app
install_method: dmg
mount_path: /Volumes/Google\ Chrome/
creates: /Applications/Google\ Chrome.app
downloads: ~/.ansible-downloads/
tasks:

14
apps/cornerstone.yml Normal file
View File

@ -0,0 +1,14 @@
---
- hosts: all
connection: local
vars:
app_name: Cornerstone
app_name_pretty: Cornerstone
app_url: "http://www.zennaware.com/mint/pepper/orderedlist/downloads/download.php?file=http%3A//www.zennaware.com/cornerstone/downloads/Cornerstone-2.7.11.zip"
installer_type: app
install_method: zip
downloads: ~/.ansible-downloads/
creates: /Applications/Cornerstone.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -9,6 +9,7 @@
install_method: dmg
mount_path: /Volumes/Firefox/
downloads: ~/.ansible-downloads/
creates: /Applications/Firefox.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -9,6 +9,7 @@
install_method: dmg
mount_path: /Volumes/HandBrake-0.9.9-MacOSX.6_GUI_x86_64/
downloads: ~/.ansible-downloads/
creates: /Applications/HandBrake.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -1,6 +1,13 @@
---
- hosts: all
connection: local
tasks:
- name: Install Xcode CLI tools
shell: /usr/bin/xcode-select --install creates=/usr/bin/gcc
sudo: yes
- 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/Homebrew/homebrew/go/install)" creates=/usr/local/bin/brew
register: brew_result
sudo: yes

17
apps/menumeters.yml Normal file
View File

@ -0,0 +1,17 @@
---
# TODO: This uses a custom installer. Might be able to install from source.
- hosts: all
connection: local
vars:
app_name: Menu\ Meters
app_name_pretty: Menu\ Meters
app_url: "http://www.ragingmenace.com/software/download/MenuMeters.dmg"
installer_type: pkg
install_method: dmg
install_target: /Volumes/Macintosh\ HD
mount_path: /Volumes/Menu\ Meters\ 1.6.1/
creates: /Applications/Menu\ Meters.app
downloads: ~/.ansible-downloads/
tasks:
- include: ../install/{{ install_method }}.yml

14
apps/nvalt.yml Normal file
View File

@ -0,0 +1,14 @@
---
- hosts: all
connection: local
vars:
app_name: nvALT
app_name_pretty: nvALT
app_url: "http://abyss.designheresy.com/nvaltb/nvalt2.2b106.zip"
installer_type: app
install_method: zip
downloads: ~/.ansible-downloads/
creates: /Applications/nvALT.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -9,6 +9,7 @@
install_method: dmg
mount_path: /Volumes/Sequel\ Pro\ 1.0.2/
downloads: ~/.ansible-downloads/
creates: /Applications/Sequel\ Pro.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -9,6 +9,7 @@
install_method: dmg
mount_path: /Volumes/Sublime\ Text/
downloads: ~/.ansible-downloads/
creates: /Applications/Sublime\ Text.app
tasks:
- include: ../install/{{ install_method }}.yml

14
apps/tower.yml Normal file
View File

@ -0,0 +1,14 @@
---
- hosts: all
connection: local
vars:
app_name: Tower
app_name_pretty: Tower
app_url: "https://macapps.fournova.com/tower1-1060/download"
installer_type: app
install_method: zip
downloads: ~/.ansible-downloads/
creates: /Applications/Tower.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -8,6 +8,7 @@
installer_type: app
install_method: zip
downloads: ~/.ansible-downloads/
creates: /Applications/Transmit.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -10,6 +10,7 @@
install_target: /Volumes/Macintosh\ HD
mount_path: /Volumes/Vagrant/
downloads: ~/.ansible-downloads/
creates: /Applications/Vagrant/bin/vagrant
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -10,6 +10,7 @@
install_method: dmg
install_target: /Volumes/Macintosh\ HD
downloads: ~/.ansible-downloads/
creates: /Applications/VirtualBox.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -9,6 +9,7 @@
install_method: dmg
mount_path: /Volumes/vlc-2.1.3/
downloads: ~/.ansible-downloads/
creates: /Applications/VLC.app
tasks:
- include: ../install/{{ install_method }}.yml

View File

@ -1,16 +1,24 @@
---
- name: Download {{ app_name_pretty }}
get_url: url={{ app_url }} dest={{ downloads }}/{{ app_name }}.dmg
# TODO: Idempotence.
- name: Mount {{ app_name_pretty }} image
command: hdiutil attach {{ app_name }}.dmg chdir={{ downloads }}
command: hdiutil attach {{ app_name }}.dmg chdir={{ downloads }} creates={{ creates }}
- name: Copy {{ app_name_pretty }} app to Applications directory
command: cp -R {{ mount_path }}{{ app_name }}.app /Applications creates=/Applications/{{ app_name }}.app
command: cp -R {{ mount_path }}{{ app_name }}.app /Applications creates={{ creates }}
when: "installer_type == 'app'"
- name: Install {{ app_name_pretty }} pkg
command: installer -package {{ mount_path }}{{ app_name }}.pkg -target {{ install_target }}
command: installer -package {{ mount_path }}{{ app_name }}.pkg -target {{ install_target }} creates={{ creates }}
sudo: yes
when: "installer_type == 'pkg'"
# TODO: Idempotence.
- name: Check if image is mounted
shell: "[ -d {{ mount_path }} ] && echo '1' || echo '0'"
changed_when: false
register: mount_exists
- name: Unmount {{ app_name_pretty }} image
command: hdiutil detach {{ mount_path }}
command: hdiutil detach {{ mount_path }}
when: "mount_exists.stdout == '1'"

View File

@ -1,4 +1,4 @@
---
# TODO: Idempotence.
- 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 }} creates={{ creates }}

View File

@ -1,20 +1,26 @@
---
- name: Download {{ app_name_pretty }}
get_url: url={{ app_url }} dest={{ downloads }}/{{ app_name }}.zip
- name: Remove existing extraction directory if present
file: path={{ downloads }}{{ app_name }}/ state=absent
- name: Check if application is already installed.
shell: "[ -f {{ creates }} ] && echo '1' || echo '0'"
changed_when: false
register: installed
- name: Create an extraction directory
file: path={{ downloads }}{{ app_name }}/ state=directory
when: "installed.stdout == '1'"
- name: Extract {{ app_name_pretty }} zip archive
command: unzip {{ app_name }}.zip -d {{ app_name }}/ chdir={{ downloads }}
- name: Remove existing app if present
file: path=/Applications/{{ app_name }}.app state=absent
when: "installer_type == 'app'"
command: unzip {{ app_name }}.zip -d {{ app_name }}/ chdir={{ downloads }} creates={{ creates }}
- 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 }} creates={{ creates }}
when: "installer_type == 'app'"
- 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 }} creates={{ creates }}
when: "installer_type == 'pkg'"
- name: Remove extraction directory
- name: Ensure extraction directory is gone
file: path={{ downloads }}{{ app_name }}/ state=absent

View File

@ -11,12 +11,17 @@
- name: Create Ansible downloads directory
file: path={{ downloads }} state=directory
- include: apps/adium.yml
- include: apps/chrome.yml
- include: apps/cornerstone.yml
- include: apps/firefox.yml
- include: apps/handbrake.yml
- include: apps/homebrew.yml
# - include: apps/menumeters.yml
- include: apps/nvalt.yml
- include: apps/sequel-pro.yml
- include: apps/sublime.yml
- include: apps/tower.yml
- include: apps/transmit.yml
- include: apps/vagrant.yml
- include: apps/virtualbox.yml