Skip to content

Commit

Permalink
Made a lot of progress on automation. Created quite a few playbooks a…
Browse files Browse the repository at this point in the history
…nd thought about how to implement them most effectively! I'm going to work on installation scripts for ansible (so you could easily install it on a local or remote workstation), documentation, abstraction, and DRY principles etc.
  • Loading branch information
Michael Griffin committed Apr 14, 2013
1 parent 925c129 commit 09dd09e
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 4 deletions.
6 changes: 6 additions & 0 deletions PLANS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Plans
=====

* Look into using Jinja2 to adhere with DRY principles. If an app comes in a tar archive, have a workflow for extracting apps from those archives, same thing if it comes in a dmg, or a zip.
* Look into the ability to change directories for multiple commands as upposed to having to change directories on each command.
* Ensure generalization of playbooks and assist distribution by replacing hosts and usernames with code that will allow them to be set on run time.
4 changes: 2 additions & 2 deletions bottle-mongodb/bottle-mongodb.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- hosts: 192.168.33.10
user: vagrant
- hosts: $hosts
user: $user
sudo: yes
vars:
mongodb_path: /mongodb/
Expand Down
11 changes: 11 additions & 0 deletions homebrew/homebrew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- include: ../local-setup.yaml

- hosts: $hosts
user: $user
gather_facts: false
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Run Homebrew install script
command: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
21 changes: 21 additions & 0 deletions limechat/limechat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- include: ../local-setup.yaml

- hosts: $hosts
user: $user
gather_facts: false
vars:
tar_url: https://downloads.sourceforge.net/project/limechat/limechat/LimeChat_2.34.tbz?use_mirror=master
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Download LimeChat
get_url: url=$tar_url dest=${downloads}/limechat.tar
- name: Create an extraction directory
file: path=${downloads}limechat/ state=directory
- name: Extract LimeChat tarball
command: tar xf limechat.tar -C limechat/ chdir=$downloads
- name: Copy LimeChat app to Applications directory
command: cp -R limechat/LimeChat.app /Applications chdir=$downloads
- name: Remove extraction directory
file: path=${downloads}limechat/ state=absent
2 changes: 2 additions & 0 deletions local-setup-vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
downloads: /.ansible-downloads/
10 changes: 10 additions & 0 deletions local-setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- hosts: $hosts
user: $user
sudo: yes
gather_facts: false
vars_files:
- local-setup-vars.yaml
tasks:
- name: Create Ansible downloads directory
file: path=$downloads state=directory
Empty file added sublime-text/README.md
Empty file.
24 changes: 24 additions & 0 deletions sublime-text/sublime-text.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- include: ../local-setup.yaml

- hosts: $hosts
user: $user
gather_facts: false
vars:
dmg_url: http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203021.dmg
mount_path: /Volumes/Sublime\ Text/
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Download Sublime Text
get_url: url=$dmg_url dest=${downloads}sublime.dmg
- name: Mount Sublime Text image
command: hdiutil mount sublime.dmg chdir=$downloads
- name: Copy Sublime Text app to Applications directory
command: cp -R ${mount_path}Sublime\ Text.app /Applications
- name: Unmount Sublime Text image
command: hdiutil unmount $mount_path
- 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
- 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
21 changes: 21 additions & 0 deletions vagrant/vagrant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- include: ../local-setup.yaml

- hosts: $hosts
user: $user
gather_facts: false
vars:
dmg_url: http://files.vagrantup.com/packages/64e360814c3ad960d810456add977fd4c7d47ce6/Vagrant.dmg
mount_path: /Volumes/Vagrant/
install_target: /Volumes/OSX
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Download Vagrant
get_url: url=$dmg_url dest=${downloads}/vagrant.dmg
- name: Mount Vagrant image
command: hdiutil mount vagrant.dmg chdir=$downloads
- name: Install Vagrant pkg
command: sudo installer -package ${mount_path}vagrant.pkg -target $install_target
- name: Unmount Vagrant image
command: hdiutil unmount $mount_path
21 changes: 21 additions & 0 deletions virtualbox/virtualbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- include: ../local-setup.yaml

- hosts: $hosts
user: $user
gather_facts: false
vars:
dmg_url: http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-OSX.dmg
mount_path: /Volumes/VirtualBox/
install_target: /Volumes/OSX
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Download VirtualBox
get_url: url=$dmg_url dest=${downloads}/virtualbox.dmg
- name: Mount VirtualBox image
command: hdiutil mount virtualbox.dmg chdir=$downloads
- name: Install VirtualBox pkg
command: sudo installer -package ${mount_path}VirtualBox.pkg -target $install_target
- name: Unmount VirtualBox image
command: hdiutil unmount $mount_path
Empty file added vlc/README.md
Empty file.
20 changes: 20 additions & 0 deletions vlc/vlc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- include: ../local-setup.yaml

- hosts: $hosts
user: $user
gather_facts: false
vars:
dmg_url: http://get.videolan.org/vlc/2.0.6/macosx/vlc-2.0.6.dmg
mount_path: /Volumes/vlc-2.0.6/
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Download VLC
get_url: url=$dmg_url dest=${downloads}/vlc.dmg
- name: Mount VLC image
command: hdiutil mount vlc.dmg chdir=$downloads
- name: Copy VLC app to Applications directory
command: cp -R ${mount_path}VLC.app /Applications
- name: Unmount VLC image
command: hdiutil unmount $mount_path
4 changes: 2 additions & 2 deletions zeromq/zeromq.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- hosts: virtual_machines
user: vagrant
- hosts: $hosts
user: $user
sudo: yes # Is it possible to only run certain actions as sudo ansible?
tasks:
- name: Install zeroMQ dependancies
Expand Down

0 comments on commit 09dd09e

Please sign in to comment.