Created some more playbooks. And changed the hdiutils command from mount and unmount to attach and detach, solving any problems with leftover images that were never ejected.

This commit is contained in:
Michael Griffin 2013-04-15 17:30:14 -07:00
parent 1f3f09b470
commit 19d7978969
8 changed files with 45 additions and 6 deletions

View File

@ -5,4 +5,6 @@
- include: keka/keka.yaml - include: keka/keka.yaml
- include: limechat/limechat.yaml - include: limechat/limechat.yaml
- include: firefox/firefox.yaml - include: firefox/firefox.yaml
- include: opera/opera.yaml # - include: opera/opera.yaml
- include: mou/mou.yaml
- include: texts/texts.yaml

View File

@ -2,7 +2,7 @@
- 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
- name: Mount $app_name_pretty image - name: Mount $app_name_pretty image
command: hdiutil mount $app_name.dmg chdir=$downloads command: hdiutil attach $app_name.dmg chdir=$downloads
- 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
when_string: $installer_type == 'app' when_string: $installer_type == 'app'
@ -10,4 +10,4 @@
command: sudo installer -package ${mount_path}$app_name.pkg -target $install_target command: sudo installer -package ${mount_path}$app_name.pkg -target $install_target
when_string: $installer_type == 'pkg' when_string: $installer_type == 'pkg'
- name: Unmount $app_name_pretty image - name: Unmount $app_name_pretty image
command: hdiutil unmount $mount_path command: hdiutil detach $mount_path

View File

@ -1,6 +1,4 @@
--- ---
- include: ../setup.yaml
- hosts: $hosts - hosts: $hosts
user: $user user: $user
vars: vars:
@ -12,4 +10,5 @@
vars_files: vars_files:
- ../setup-vars.yaml - ../setup-vars.yaml
tasks: tasks:
- include: ../setup.yaml
- include: ../install/$install_method.yaml - include: ../install/$install_method.yaml

4
mou/README.md Normal file
View File

@ -0,0 +1,4 @@
Mou
===
This Ansible playbook installs Mou, a feature rich Markdown editor.

14
mou/mou.yaml Normal file
View File

@ -0,0 +1,14 @@
---
- hosts: $hosts
user: $user
vars:
app_name: Mou
app_name_pretty: Mou
app_url: http://mouapp.com/download/Mou.zip
installer_type: app
install_method: zip
vars_files:
- ../setup-vars.yaml
tasks:
- include: ../setup.yaml
- include: ../install/$install_method.yaml

View File

@ -5,7 +5,7 @@
vars: vars:
app_name: Opera app_name: Opera
app_name_pretty: Opera app_name_pretty: Opera
app_url: http://www.opera.com/download/get/?partner=www&opsys=MacOS app_url: http://ftp.opera.com/pub/opera/mac/1215/Opera_12.15_Setup_Intel.dmg
installer_type: app installer_type: app
install_method: dmg install_method: dmg
mount_path: /Volumes/Opera/ mount_path: /Volumes/Opera/

4
texts/README.md Normal file
View File

@ -0,0 +1,4 @@
Texts
=====
This Ansible playbook installs Texts, a lightweight Markdown editor.

16
texts/texts.yaml Normal file
View File

@ -0,0 +1,16 @@
---
- hosts: $hosts
user: $user
sudo: yes
vars:
app_name: Texts
app_name_pretty: Texts
app_url: http://www.texts.io/Texts-0.13.1.dmg
installer_type: app
install_method: dmg
mount_path: /Volumes/Texts/
vars_files:
- ../setup-vars.yaml
tasks:
- include: ../setup.yaml
- include: ../install/$install_method.yaml