blob: 6de720cad1552741fc87f5db6f8bc1bfe4b78746 [file] [log] [blame]
Jessica Wagantall564913e2018-03-19 13:41:33 -07001---
2- import_playbook: ../common-packer/provision/docker.yaml
3
4- hosts: all
5 become_user: root
6 become_method: sudo
Jessica Wagantall0cd37002018-03-27 16:14:46 -07007 vars:
8 docker_compose_version: 1.17.1
9 glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c
10 glide_version: v0.13.1
11 golang_checksum: sha256:07d81c6b6b4c2dcf1b5ef7c27aaebd3691cdb40548500941f92b221147c5d9c7
12 golang_version: 1.9.1
Jessica Wagantall564913e2018-03-19 13:41:33 -070013
Jessica Wagantall0cd37002018-03-27 16:14:46 -070014 tasks:
15 - name: 'Install Docker Compose {{docker_compose_version}}'
16 command: curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/{{docker_compose_version}}/docker-compose-$(uname -s)-$(uname -m)"
Jessica Wagantall564913e2018-03-19 13:41:33 -070017 become: true
Jessica Wagantall0cd37002018-03-27 16:14:46 -070018
19 - name: 'Install GoLang {{golang_version}}'
20 block:
21 - name: 'Fetch golang {{golang_version}} to /tmp/go{{golang_version}}.linux-amd64.tar.gz'
22 get_url:
23 url: 'https://storage.googleapis.com/golang/go{{golang_version}}.linux-amd64.tar.gz'
24 dest: '/tmp/go{{golang_version}}.linux-amd64.tar.gz'
25 checksum: '{{golang_checksum}}'
26 - name: 'Install golang {{golang_version}} to /usr/local'
27 unarchive:
28 src: '/tmp/go{{golang_version}}.linux-amd64.tar.gz'
29 dest: /usr/local
30 remote_src: true
31 become: true
32 - name: 'Add golang to PATH'
33 command: 'echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile'
34 become: true