blob: 4170b81652553b8260e5254a6cee1ac1c40ecda9 [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:
Jessica Wagantall5db567b2018-08-16 20:26:42 -07008 apt_file: /etc/apt/sources.list.d/google-chrome.list
Jessica Wagantall0cd37002018-03-27 16:14:46 -07009 docker_compose_version: 1.17.1
10 glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c
11 glide_version: v0.13.1
12 golang_checksum: sha256:07d81c6b6b4c2dcf1b5ef7c27aaebd3691cdb40548500941f92b221147c5d9c7
13 golang_version: 1.9.1
Jessica Wagantall564913e2018-03-19 13:41:33 -070014
Jessica Wagantall0cd37002018-03-27 16:14:46 -070015 tasks:
16 - name: 'Install Docker Compose {{docker_compose_version}}'
Jessica Wagantall096164e2018-08-15 10:07:47 -070017 command: curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/{{docker_compose_version}}/docker-compose-Linux-x86_64"
Jessica Wagantall564913e2018-03-19 13:41:33 -070018 become: true
Jessica Wagantall0cd37002018-03-27 16:14:46 -070019
Jessica Wagantall5826a6a2018-08-11 23:38:07 -070020 - file:
21 path: /usr/local/bin/docker-compose
22 mode: "+x"
Jessica Wagantalldbadc482018-08-13 14:13:57 -070023 become: true
Jessica Wagantall5826a6a2018-08-11 23:38:07 -070024
Jessica Wagantall0cd37002018-03-27 16:14:46 -070025 - name: 'Install GoLang {{golang_version}}'
26 block:
27 - name: 'Fetch golang {{golang_version}} to /tmp/go{{golang_version}}.linux-amd64.tar.gz'
28 get_url:
29 url: 'https://storage.googleapis.com/golang/go{{golang_version}}.linux-amd64.tar.gz'
30 dest: '/tmp/go{{golang_version}}.linux-amd64.tar.gz'
31 checksum: '{{golang_checksum}}'
32 - name: 'Install golang {{golang_version}} to /usr/local'
33 unarchive:
34 src: '/tmp/go{{golang_version}}.linux-amd64.tar.gz'
35 dest: /usr/local
36 remote_src: true
37 become: true
38 - name: 'Add golang to PATH'
39 command: 'echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile'
40 become: true
Jessica Wagantall19ce2f52018-08-08 12:25:08 -070041
42 - name: Install libxml2-utils
43 apt:
44 name: libxml2-utils
45 state: present
46 become: true
Jessica Wagantall7f93ce02018-08-09 19:41:49 -070047
48 - name: Install python-tox
49 apt:
50 name: python-tox
51 state: present
52 become: true
Jessica Wagantall42bf8272018-08-09 22:02:42 -070053
54 - apt_repository:
55 repo: ppa:jonathonf/python-3.6
56 state: present
57 become: true
58
59 - name: Update and upgrade apt packages
60 apt:
61 upgrade: yes
62 update_cache: yes
63 become: true
64
65 - name: Install Python 3.6 and packages
66 apt:
67 name:
68 - python3.6
69 - python3.6-dev
70 - libssl-dev
71 - libmysqlclient-dev
72 - gcc
73 become: true
Jessica Wagantall3fc37fe2018-08-10 00:16:16 -070074
75 - name: Install base packages
76 apt:
77 name:
78 - unzip
79 - xz-utils
80 - libxml-xpath-perl
81 - wget
82 - make
83 - npm
84 - sshuttle
85 - netcat
86 - libssl-dev
87 - libffi-dev
88 become: true
89
90 - name: Install autorelease support packages
91 apt:
92 name:
93 - firefox
94 - xmlstarlet
95 - xvfb
96 - crudini
97 - maven
98 - python-ncclient
99 become: true
Jessica Wagantall5db567b2018-08-16 20:26:42 -0700100
101 - name: Add Google Chrome key
102 apt_key:
103 url: https://dl-ssl.google.com/linux/linux_signing_key.pub
104 state: present
105 become: true
106
107 - name: Add Google Chrome repo
108 copy: content="deb http://dl.google.com/linux/chrome/deb/ stable main" dest={{apt_file}} owner=root group=root mode=644
109 become: true
110
111 - name: Update apt cache
112 apt: update_cache=yes
113 become: true
114
115 - name: Install Google Chrome
116 apt:
117 name: google-chrome-stable
118 state: present
119 become: true
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700120
Jessica Wagantall6e96b2e2018-08-21 14:38:37 -0700121 - name: Install Erlang dependency packages
122 apt:
123 name:
124 - libwxgtk3.0-0v5
125 - libsctp1
126 - libwxbase3.0-0v5
127 become: true
128
129 - name: Install Erlang
130 apt:
131 deb: https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.3.6-1~ubuntu~trusty_amd64.deb
132 install_recommends: yes
133 become: true
134
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700135 - name: Clone rebar3
136 git:
137 repo: 'https://github.com/erlang/rebar3.git'
138 dest: /tmp/rebar3
139
140 - name: Bootstrap rebar3
141 command: ./bootstrap
142 args:
143 chdir: /tmp/rebar3
144
Jessica Wagantall79c77662018-08-21 14:16:28 -0700145 - name: Install rebar3 to bin
146 copy:
147 src: /tmp/rebar3/rebar3
148 dest: /usr/bin/rebar3
149 remote_src: true
Jessica Wagantall58744aa2018-08-21 17:48:03 -0700150 become: true
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700151
152 - name: Remove unused rebar3 source
153 file:
154 path: /tmp/rebar3
155 state: absent