From fbc67119dc2ea60645a9d4980e76e5bab92d797b Mon Sep 17 00:00:00 2001 From: Michael Griffin Date: Sun, 14 Apr 2013 02:13:21 -0700 Subject: [PATCH] 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. --- transmission/transmission.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 transmission/transmission.yaml diff --git a/transmission/transmission.yaml b/transmission/transmission.yaml new file mode 100644 index 0000000..025be79 --- /dev/null +++ b/transmission/transmission.yaml @@ -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 \ No newline at end of file