Skip to content

Commit

Permalink
Introduce new role: ableton.fastbuild
Browse files Browse the repository at this point in the history
This role installs FASTBuild on a Windows-based system. We could
theoretically support Linux and Mac in the future, since FASTBuild
supports those platforms (albeit in alpha).
  • Loading branch information
nre-ableton authored and ablbot committed Jan 8, 2018
0 parents commit 6f7444f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FASTBuild Role
==============

This role installs the [FASTBuild][fastbuild] build system software on the given
Ansible host.


Supported Host OS Types
-----------------------

Currently this role only supports Windows hosts, even though FASTBuild has alpha
support for Linux and Mac OS X.


Role Variables
--------------

This role defines the following variables which can be overridden:

- `fastbuild_arch`
- `fastbuild_version`
- `fastbuild_path_win`

See `defaults/main.yml` for further documentation of these variables.


[fastbuild]: http://fastbuild.org
12 changes: 12 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Architecture to download for. Valid values include 'x64' and 'x86'. Note that
# the 'x86' (32-bit) variant is only supported for Windows, and is known to be
# slower than the 64-bit version. Unless you are running a 32-bit version of
# Windows, it is not advised to change this value.
fastbuild_arch: 'x64'

# Version of FASTBuild to install.
fastbuild_version: '0.94'

# On Windows, this determines where the FASTBuild executables will be extracted.
fastbuild_path_win: C:\Windows
22 changes: 22 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
galaxy_info:
author: Nik Reiman
description: Installs FASTBuild
company: Ableton AG

license: BSD

min_ansible_version: 1.2

github_branch: master

platforms:
- name: Windows
versions:
- 8
- 8.1
- 10

galaxy_tags: []

dependencies: []
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
- include_tasks: "{{ ansible_os_family | lower }}/main.yml"
17 changes: 17 additions & 0 deletions tasks/windows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Create temporary directory for downloads
win_tempfile:
state: directory
prefix: fastbuild
register: fastbuild_temp_dir

- name: Download FASTBuild zipfile
win_get_url:
url: "{{ fastbuild_url_base }}/v{{ fastbuild_version }}/FASTBuild-Windows-{{ fastbuild_arch }}-v{{ fastbuild_version }}.zip"
dest: "{{ fastbuild_temp_dir.path }}/FASTBuild.zip"

- name: Unzip FASTBuild archive
win_unzip:
src: "{{ fastbuild_temp_dir.path }}/FASTBuild.zip"
dest: "{{ fastbuild_path_win }}"
delete_archive: true
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# Base URL where the software will be downloaded from.
fastbuild_url_base: 'http://fastbuild.org/downloads'

0 comments on commit 6f7444f

Please sign in to comment.