mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-21 19:33:03 +00:00
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:
parent
09dd09e154
commit
fbc67119dc
1 changed files with 21 additions and 0 deletions
21
transmission/transmission.yaml
Normal file
21
transmission/transmission.yaml
Normal 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
|
Loading…
Reference in a new issue