Skip to content

Commit

Permalink
Initial implementation
Browse files Browse the repository at this point in the history
Change-Id: Id6eaa0bd300b816136cb2d7be855fa07da5a7199
  • Loading branch information
dpursehouse committed Dec 3, 2015
1 parent d214724 commit ae05b09
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright 2015 David Pursehouse. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
buck
====

Installs Buck

Requirements
------------

This role requires Ansible 1.4 or higher.

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

| Name | Default | Description |
|------------------------|-----------------------------------|---------------------------------------------|
| buck_repository_url | https://github.com/facebook/buck | URL of buck git repository |
| buck_installation_dir | /opt/buck | Source installation directory |
| buck_revision | master | Revision of buck to check out |
| buck_bin_dir | /usr/local/bin | Directory in which to symlink the binaries |

Example Playbook
----------------

Install Buck
```
- hosts: all
roles:
- { role: dpursehouse.buck }
```

Install Buck specifying version
```
- hosts: all
roles:
- { role: dpursehouse.buck, buck_version: ba9f239f69287a553ca93af76a27484d83693563 }
```

License
-------

MIT

Author Information
------------------

David Pursehouse
Empty file added defaults/main.yml
Empty file.
14 changes: 14 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
galaxy_info:
author: David Pursehouse
description: Installs Buck
company:
license: MIT
min_ansible_version: 1.4
platforms:
- name: Ubuntu
versions:
- trusty
categories:
- development
dependencies: []
43 changes: 43 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# tasks file for Buck

- name: Create Buck installation directory
file: >
path={{ buck_installation_dir }}
owner=root
group=root
mode=0755
state=directory
tags: buck

- name: Clone Buck
git: >
repo={{ buck_repository_url }}
dest={{ buck_installation_dir }}
version={{ buck_revision }}
tags: buck

- name: Build Buck
command: >
ant clean && ant
chdir={{ buck_installation_dir }}
tags: buck

- name: Create buck symlink
file: >
src={{ buck_installation_dir }}/bin/buck
dest={{ buck_bin_dir }}/buck
owner=root
group=root
state=link
tags: buck

- name: Create buckd symlink
file: >
src={{ buck_installation_dir }}/bin/buckd
dest={{ buck_bin_dir }}/buckd
owner=root
group=root
state=link
tags: buck

7 changes: 7 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# vars file for Buck

buck_repository_url: https://github.com/facebook/buck
buck_installation_dir: /opt/buck
buck_revision: master
buck_bin_dir: /usr/local/bin/

0 comments on commit ae05b09

Please sign in to comment.