blob: 9b3c442c6972e3af7d3f5de33b4ec0f26b3d7257 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
---
- name: install packages
apt:
name:
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
- gstreamer-tools
- git
- libasound2-dev
- name: download golang tarball
get_url:
url: "https://dl.google.com/go/go{{ dolmetsch_raspi_golang_version }}.linux-armv6l.tar.gz"
dest: "/usr/local/src/go{{ dolmetsch_raspi_golang_version }}.linux-armv6l.tar.gz"
checksum: "{{ dolmetsch_raspi_golang_checksum }}"
- name: check current goloang version (if any)
command: /usr/local/go/bin/go version
ignore_errors: yes
check_mode: no
changed_when: false
register: golang_version
- name: update golang installation
when: golang_version is failed or golang_version.stdout != ("go version go" + dolmetsch_raspi_golang_version + " linux/arm")
block:
- name: remove old golang installation
file:
path: /usr/local/go
state: absent
- name: extract the golang tarball
unarchive:
src: "/usr/local/src/go{{ dolmetsch_raspi_golang_version }}.linux-armv6l.tar.gz"
dest: /usr/local
copy: no
- name: prepare dolmetschctl install path
file:
path: /opt/dolmetschctl
state: directory
- name: build dolmetschctl (server and client)
with_items:
- dolmetschctl
- dolmetschctld
command: "/usr/local/go/bin/go get spreadspace.org/dolmetschctl/cmd/{{ item }}"
args:
creates: "/opt/dolmetschctl/bin/{{ item }}"
environment:
GOPATH: /opt/dolmetschctl
|