From 6617e8c3ad785dbbcab48c4a331118cc1d108a1e Mon Sep 17 00:00:00 2001 From: Michael Griffin Date: Mon, 15 Apr 2013 17:00:01 -0700 Subject: [PATCH] Made quite a bit of progress on application specific playbooks as well as flow and structure. --- appcleaner/appcleaner.yaml | 15 +++++++++++++++ applications.yaml | 6 +++++- firefox/firefox.yaml | 16 ++++++++++++++++ {install-type => install}/app.yaml | 0 {install-type => install}/dmg.yaml | 4 ++-- {install-type => install}/homebrew.yaml | 2 +- {install-type => install}/lzma.yaml | 0 {install-type => install}/pkg.yaml | 0 {install-type => install}/tar.yaml | 4 ++-- {install-type => install}/zip.yaml | 4 ++-- iterm/iterm.yaml | 5 +++-- keka/keka.yaml | 16 ++++++++++++++++ limechat/limechat.yaml | 10 +++++----- opera/opera.yaml | 16 ++++++++++++++++ setup.yaml | 10 ++-------- sourcetree/sourcetree.yaml | 5 +++-- sublime-text/sublime-text.yaml | 5 +++-- transmission/transmission.yaml | 9 +++++---- tree/tree.yaml | 3 ++- .../trim-enabler.yaml | 0 vagrant/vagrant.yaml | 7 ++++--- virtualbox/virtualbox.yaml | 7 ++++--- vlc/vlc.yaml | 9 +++++---- 23 files changed, 111 insertions(+), 42 deletions(-) rename {install-type => install}/app.yaml (100%) rename {install-type => install}/dmg.yaml (86%) rename {install-type => install}/homebrew.yaml (58%) rename {install-type => install}/lzma.yaml (100%) rename {install-type => install}/pkg.yaml (100%) rename {install-type => install}/tar.yaml (88%) rename {install-type => install}/zip.yaml (88%) rename trimenabler/trimenabler.yaml => trim-enabler/trim-enabler.yaml (100%) diff --git a/appcleaner/appcleaner.yaml b/appcleaner/appcleaner.yaml index e69de29..c90910a 100644 --- a/appcleaner/appcleaner.yaml +++ b/appcleaner/appcleaner.yaml @@ -0,0 +1,15 @@ +--- +- hosts: $hosts + user: $user + sudo: yes + vars: + app_name: AppCleaner + app_name_pretty: AppCleaner + app_url: http://www.freemacsoft.net/downloads/AppCleaner_2.1.zip + installer_type: app + install_method: zip + vars_files: + - ../setup-vars.yaml + tasks: + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/applications.yaml b/applications.yaml index 3a13e1b..7648c2b 100644 --- a/applications.yaml +++ b/applications.yaml @@ -1,4 +1,8 @@ --- - include: vlc/vlc.yaml - include: transmission/transmission.yaml -- include: iterm/iterm.yaml +- include: appcleaner/appcleaner.yaml +- include: keka/keka.yaml +- include: limechat/limechat.yaml +- include: firefox/firefox.yaml +- include: opera/opera.yaml \ No newline at end of file diff --git a/firefox/firefox.yaml b/firefox/firefox.yaml index e69de29..c1325a1 100644 --- a/firefox/firefox.yaml +++ b/firefox/firefox.yaml @@ -0,0 +1,16 @@ +--- +- hosts: $hosts + user: $user + sudo: yes + vars: + app_name: Firefox + app_name_pretty: Firefox + app_url: https://download.mozilla.org/?product=firefox-20.0&os=osx&lang=en-US + installer_type: app + install_method: dmg + mount_path: /Volumes/Firefox/ + vars_files: + - ../setup-vars.yaml + tasks: + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/install-type/app.yaml b/install/app.yaml similarity index 100% rename from install-type/app.yaml rename to install/app.yaml diff --git a/install-type/dmg.yaml b/install/dmg.yaml similarity index 86% rename from install-type/dmg.yaml rename to install/dmg.yaml index 88f2a1e..f36fd3d 100644 --- a/install-type/dmg.yaml +++ b/install/dmg.yaml @@ -5,9 +5,9 @@ command: hdiutil mount $app_name.dmg chdir=$downloads - name: Copy $app_name_pretty app to Applications directory command: cp -R ${mount_path}$app_name.app /Applications - when_string: $install_type == 'app' + when_string: $installer_type == 'app' - name: Install $app_name pkg command: sudo installer -package ${mount_path}$app_name.pkg -target $install_target - when_string: $install_type == 'pkg' + when_string: $installer_type == 'pkg' - name: Unmount $app_name_pretty image command: hdiutil unmount $mount_path \ No newline at end of file diff --git a/install-type/homebrew.yaml b/install/homebrew.yaml similarity index 58% rename from install-type/homebrew.yaml rename to install/homebrew.yaml index 34f129f..30d8b58 100644 --- a/install-type/homebrew.yaml +++ b/install/homebrew.yaml @@ -1,3 +1,3 @@ --- -- name: Installing $app_name_pretty +- name: Install $app_name_pretty via Homebrew homebrew: name=$app_name state=installed update_homebrew=yes \ No newline at end of file diff --git a/install-type/lzma.yaml b/install/lzma.yaml similarity index 100% rename from install-type/lzma.yaml rename to install/lzma.yaml diff --git a/install-type/pkg.yaml b/install/pkg.yaml similarity index 100% rename from install-type/pkg.yaml rename to install/pkg.yaml diff --git a/install-type/tar.yaml b/install/tar.yaml similarity index 88% rename from install-type/tar.yaml rename to install/tar.yaml index 20e5124..2180631 100644 --- a/install-type/tar.yaml +++ b/install/tar.yaml @@ -7,9 +7,9 @@ command: tar xf $app_name.tar -C $app_name/ chdir=$downloads - name: Copy $app_name_pretty app to Applications directory command: cp -R $app_name/$app_name.app /Applications chdir=$downloads - when_string: $install_type == 'app' + when_string: $installer_type == 'app' - name: Install $app_name pkg command: sudo installer -package $app_name/$app_name.pkg -target $install_target chdir=$downloads - when_string: $install_type == 'pkg' + when_string: $installer_type == 'pkg' - name: Remove extraction directory file: path=${downloads}${app_name}/ state=absent \ No newline at end of file diff --git a/install-type/zip.yaml b/install/zip.yaml similarity index 88% rename from install-type/zip.yaml rename to install/zip.yaml index b847fca..2783dca 100644 --- a/install-type/zip.yaml +++ b/install/zip.yaml @@ -7,9 +7,9 @@ command: unzip $app_name.zip -d $app_name/ chdir=$downloads - name: Copy $app_name_pretty app to Applications directory command: cp -R $app_name/$app_name.app /Applications chdir=$downloads - when_string: $install_type == 'app' + when_string: $installer_type == 'app' - name: Install $app_name pkg command: sudo installer -package $app_name/$app_name.pkg -target $install_target chdir=$downloads - when_string: $install_type == 'pkg' + when_string: $installer_type == 'pkg' - name: Remove extraction directory file: path=${downloads}${app_name}/ state=absent \ No newline at end of file diff --git a/iterm/iterm.yaml b/iterm/iterm.yaml index ac04284..a68f641 100644 --- a/iterm/iterm.yaml +++ b/iterm/iterm.yaml @@ -4,11 +4,12 @@ - hosts: $hosts user: $user vars: - install_type: app app_name: iTerm app_name_pretty: iTerm app_url: https://copy.com/HTIIPAwoiKVY + installer_type: app + install_method: zip vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/zip.yaml \ No newline at end of file + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/keka/keka.yaml b/keka/keka.yaml index e69de29..75918c8 100644 --- a/keka/keka.yaml +++ b/keka/keka.yaml @@ -0,0 +1,16 @@ +--- +- hosts: $hosts + user: $user + sudo: yes + vars: + app_name: Keka + app_name_pretty: Keka + app_url: http://download.kekaosx.com/ + installer_type: app + install_method: dmg + mount_path: /Volumes/Keka/ + vars_files: + - ../setup-vars.yaml + tasks: + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/limechat/limechat.yaml b/limechat/limechat.yaml index 3c9a913..f30587f 100644 --- a/limechat/limechat.yaml +++ b/limechat/limechat.yaml @@ -1,15 +1,15 @@ --- -- include: ../setup.yaml - - hosts: $hosts user: $user - gather_facts: false + sudo: yes vars: - install_type: app app_name: LimeChat app_name_pretty: LimeChat app_url: https://downloads.sourceforge.net/project/limechat/limechat/LimeChat_2.34.tbz?use_mirror=master + installer_type: app + install_method: tar vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/tar.yaml \ No newline at end of file + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/opera/opera.yaml b/opera/opera.yaml index e69de29..0489944 100644 --- a/opera/opera.yaml +++ b/opera/opera.yaml @@ -0,0 +1,16 @@ +--- +- hosts: $hosts + user: $user + sudo: yes + vars: + app_name: Opera + app_name_pretty: Opera + app_url: http://www.opera.com/download/get/?partner=www&opsys=MacOS + installer_type: app + install_method: dmg + mount_path: /Volumes/Opera/ + vars_files: + - ../setup-vars.yaml + tasks: + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/setup.yaml b/setup.yaml index 5d57a23..0bb7828 100644 --- a/setup.yaml +++ b/setup.yaml @@ -1,9 +1,3 @@ --- -- hosts: $hosts - user: $user - sudo: yes - vars_files: - - setup-vars.yaml - tasks: - - name: Create Ansible downloads directory - file: path=$downloads state=directory \ No newline at end of file +- name: Create Ansible downloads directory + file: path=$downloads state=directory \ No newline at end of file diff --git a/sourcetree/sourcetree.yaml b/sourcetree/sourcetree.yaml index cdd2409..de0ccad 100644 --- a/sourcetree/sourcetree.yaml +++ b/sourcetree/sourcetree.yaml @@ -5,12 +5,13 @@ user: $user gather_facts: false vars: - install_type: app app_name: SourceTree app_name_pretty: SourceTree app_url: https://copy.com/RDxUBW9uhWiQ/SourceTree-1.5.8.dmg?download=1 + installer_type: app + install_method: dmg mount_path: /Volumes/SourceTree/ vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/dmg.yaml \ No newline at end of file + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/sublime-text/sublime-text.yaml b/sublime-text/sublime-text.yaml index 6f704c9..105e324 100644 --- a/sublime-text/sublime-text.yaml +++ b/sublime-text/sublime-text.yaml @@ -4,15 +4,16 @@ - hosts: $hosts user: $user vars: - install_type: app app_name: Sublime\ Text app_name_pretty: Sublime\ Text app_url: http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203021.dmg + installer_type: app + install_method: dmg mount_path: /Volumes/Sublime\ Text/ vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/dmg.yaml + - include: ../install/$install_method.yaml - 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 diff --git a/transmission/transmission.yaml b/transmission/transmission.yaml index d019f9e..fa0db00 100644 --- a/transmission/transmission.yaml +++ b/transmission/transmission.yaml @@ -1,15 +1,16 @@ --- -- include: ../setup.yaml - - hosts: $hosts user: $user + sudo: yes vars: - install_type: app app_name: Transmission app_name_pretty: Transmission app_url: https://copy.com/jTqaA0JWmTmn/Transmission-2.77.dmg?download=1 + installer_type: app + install_method: dmg mount_path: /Volumes/Transmission/ vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/dmg.yaml \ No newline at end of file + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/tree/tree.yaml b/tree/tree.yaml index 082299d..2bc21cf 100644 --- a/tree/tree.yaml +++ b/tree/tree.yaml @@ -6,7 +6,8 @@ vars: app_name: tree app_name_pretty: tree + install_method: homebrew vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/homebrew.yaml \ No newline at end of file + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/trimenabler/trimenabler.yaml b/trim-enabler/trim-enabler.yaml similarity index 100% rename from trimenabler/trimenabler.yaml rename to trim-enabler/trim-enabler.yaml diff --git a/vagrant/vagrant.yaml b/vagrant/vagrant.yaml index 7475b3c..e82b45d 100644 --- a/vagrant/vagrant.yaml +++ b/vagrant/vagrant.yaml @@ -4,13 +4,14 @@ - hosts: $hosts user: $user vars: - install_type: pkg - install_target: /Volumes/OSX app_name: Vagrant app_name_pretty: Vagrant app_url: http://files.vagrantup.com/packages/64e360814c3ad960d810456add977fd4c7d47ce6/Vagrant.dmg + installer_type: pkg + install_method: dmg + install_target: /Volumes/OSX mount_path: /Volumes/Vagrant/ vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/dmg.pkg \ No newline at end of file + - include: ../install/$install_method.pkg \ No newline at end of file diff --git a/virtualbox/virtualbox.yaml b/virtualbox/virtualbox.yaml index 48e2c3f..a43b6b3 100644 --- a/virtualbox/virtualbox.yaml +++ b/virtualbox/virtualbox.yaml @@ -4,13 +4,14 @@ - hosts: $hosts user: $user vars: - install_type: pkg - install_target: /Volumes/OSX app_name: VirtualBox app_name_pretty: VirtualBox app_url: http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-OSX.dmg mount_path: /Volumes/VirtualBox/ + installer_type: pkg + install_method: dmg + install_target: /Volumes/OSX vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/dmg.yaml \ No newline at end of file + - include: ../install/$install_method.yaml \ No newline at end of file diff --git a/vlc/vlc.yaml b/vlc/vlc.yaml index 43ab73f..048cf84 100644 --- a/vlc/vlc.yaml +++ b/vlc/vlc.yaml @@ -1,15 +1,16 @@ --- -- include: ../setup.yaml - - hosts: $hosts user: $user + sudo: yes vars: - install_type: app app_name: VLC app_name_pretty: VLC app_url: https://copy.com/8WKZ3x1ZWOIC/VLC-2.0.6.dmg?download=1 + installer_type: app + install_method: dmg mount_path: /Volumes/vlc-2.0.6/ vars_files: - ../setup-vars.yaml tasks: - - include: ../install-type/dmg.yaml \ No newline at end of file + - include: ../setup.yaml + - include: ../install/$install_method.yaml \ No newline at end of file