Added Transmission playbook. Also the realization recently cemented in my brain that I can use Ansible and Jinja2 variables anywhere in a playbook, and I mean anywhere! This will greatly help with separation of logic and DRY principles as I will be able to pull out the logic of dealing with DMGs, Tars, and Zips when installing, as they all seem to be using the same formula at this point. I will have to add DMG ejection to the flow, as well as determining how to automate the removal of DMGs from disk utility.

This commit is contained in:
Michael Griffin 2013-04-14 02:13:21 -07:00
parent 09dd09e154
commit fbc67119dc

View file

@ -0,0 +1,21 @@
---
- include: ../local-setup.yaml
- hosts: $hosts
user: $user
gather_facts: false
vars:
dmg_url: http://download.transmissionbt.com/files/Transmission-2.77.dmg
mount_path: /Volumes/Transmission/
application: Transmission
vars_files:
- ../local-setup-vars.yaml
tasks:
- name: Download $application
get_url: url=$dmg_url dest=${downloads}/$application.dmg
- name: Mount $application image
command: hdiutil mount $application.dmg chdir=$downloads
- name: Copy $application app to Applications directory
command: cp -R ${mount_path}$application.app /Applications
- name: Unmount $application image
command: hdiutil unmount $mount_path