16 lines
737 B
YAML
16 lines
737 B
YAML
---
|
|
- name: Download {{ app_name_pretty }}
|
|
get_url: url={{ app_url }} dest={{ downloads }}/{{ app_name }}.dmg
|
|
# TODO: Idempotence.
|
|
- name: Mount {{ app_name_pretty }} image
|
|
command: hdiutil attach {{ app_name }}.dmg chdir={{ downloads }}
|
|
- name: Copy {{ app_name_pretty }} app to Applications directory
|
|
command: cp -R {{ mount_path }}{{ app_name }}.app /Applications creates=/Applications/{{ app_name }}.app
|
|
when: "installer_type == 'app'"
|
|
- name: Install {{ app_name_pretty }} pkg
|
|
command: installer -package {{ mount_path }}{{ app_name }}.pkg -target {{ install_target }}
|
|
sudo: yes
|
|
when: "installer_type == 'pkg'"
|
|
# TODO: Idempotence.
|
|
- name: Unmount {{ app_name_pretty }} image
|
|
command: hdiutil detach {{ mount_path }} |