--- - 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