Browse Source

Add install-bin tasks to download applications' binaries

master
Maxim Likhachev 6 years ago
parent
commit
b3a0af6cd1
  1. 13
      roles/macos/tasks/install-bin.yml
  2. 5
      roles/macos/tasks/main.yml
  3. 5
      roles/macos/vars/main.yml

13
roles/macos/tasks/install-bin.yml

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
---
- name: Check if {{ app_name }} is installed
local_action: stat path={{ installation_directory }}/{{ app_name }}
register: app_exists
- name: Download {{ app_name }} to {{ installation_directory }}
become: yes
get_url:
url: "{{ app_url }}"
dest: "{{ installation_directory }}/{{ app_name }}"
when: app_exists.stat.exists == False

5
roles/macos/tasks/main.yml

@ -51,3 +51,8 @@ @@ -51,3 +51,8 @@
- include: nativefier.yml app_name="{{ item.name }}" app_www="{{ item.www }}"
with_items:
- "{{ apps_nativefier }}"
- include: install-bin.yml app_name="{{ item.name }}" app_url="{{ item.url }}" installation_directory={{ default_bin_directory }}
with_items:
- "{{ apps_binary }}"

5
roles/macos/vars/main.yml

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
---
default_installation_directory: '/Applications'
default_bin_directory: '/usr/local/bin'
default_shell:
name: 'Bash'
@ -124,3 +125,7 @@ apps_nativefier: @@ -124,3 +125,7 @@ apps_nativefier:
- name: TeamWeek
www: https://app.teamweek.com
apps_binary:
- name: red
url: "https://static.red-lang.org/dl/auto/mac/red-latest"

Loading…
Cancel
Save