Jessica Wagantall | 564913e | 2018-03-19 13:41:33 -0700 | [diff] [blame] | 1 | --- |
| 2 | - import_playbook: ../common-packer/provision/docker.yaml |
| 3 | |
| 4 | - hosts: all |
| 5 | become_user: root |
| 6 | become_method: sudo |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 7 | 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 Wagantall | 564913e | 2018-03-19 13:41:33 -0700 | [diff] [blame] | 13 | |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 14 | 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 Wagantall | 564913e | 2018-03-19 13:41:33 -0700 | [diff] [blame] | 17 | become: true |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 18 | |
| 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 |