blob: 7bb1c03140d4653d63b24e3947382161ddc8bded [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
Jessica Wagantallb4acd422018-09-05 13:38:55 -070038 - name: Create symbolic link to go bin
39 file:
40 src: "/usr/local/go/bin/go"
41 dest: "/usr/bin/go"
42 state: link
Jessica Wagantall0cd37002018-03-27 16:14:46 -070043 become: true
Jessica Wagantall19ce2f52018-08-08 12:25:08 -070044
45 - name: Install libxml2-utils
46 apt:
47 name: libxml2-utils
48 state: present
49 become: true
Jessica Wagantall7f93ce02018-08-09 19:41:49 -070050
51 - name: Install python-tox
52 apt:
53 name: python-tox
54 state: present
55 become: true
Jessica Wagantall42bf8272018-08-09 22:02:42 -070056
57 - apt_repository:
58 repo: ppa:jonathonf/python-3.6
59 state: present
60 become: true
61
62 - name: Update and upgrade apt packages
63 apt:
64 upgrade: yes
65 update_cache: yes
66 become: true
67
68 - name: Install Python 3.6 and packages
69 apt:
70 name:
71 - python3.6
72 - python3.6-dev
73 - libssl-dev
74 - libmysqlclient-dev
75 - gcc
76 become: true
Jessica Wagantall3fc37fe2018-08-10 00:16:16 -070077
78 - name: Install base packages
79 apt:
80 name:
81 - unzip
82 - xz-utils
83 - libxml-xpath-perl
84 - wget
85 - make
86 - npm
87 - sshuttle
88 - netcat
89 - libssl-dev
90 - libffi-dev
91 become: true
92
93 - name: Install autorelease support packages
94 apt:
95 name:
Jessica Wagantall3fc37fe2018-08-10 00:16:16 -070096 - xmlstarlet
97 - xvfb
98 - crudini
99 - maven
100 - python-ncclient
101 become: true
Jessica Wagantall5db567b2018-08-16 20:26:42 -0700102
103 - name: Add Google Chrome key
104 apt_key:
105 url: https://dl-ssl.google.com/linux/linux_signing_key.pub
106 state: present
107 become: true
108
109 - name: Add Google Chrome repo
110 copy: content="deb http://dl.google.com/linux/chrome/deb/ stable main" dest={{apt_file}} owner=root group=root mode=644
111 become: true
112
113 - name: Update apt cache
114 apt: update_cache=yes
115 become: true
116
117 - name: Install Google Chrome
118 apt:
119 name: google-chrome-stable
120 state: present
121 become: true
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700122
Jessica Wagantall6e96b2e2018-08-21 14:38:37 -0700123 - name: Install Erlang dependency packages
124 apt:
125 name:
126 - libwxgtk3.0-0v5
127 - libsctp1
128 - libwxbase3.0-0v5
129 become: true
130
131 - name: Install Erlang
132 apt:
133 deb: https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.3.6-1~ubuntu~trusty_amd64.deb
134 install_recommends: yes
135 become: true
136
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700137 - name: Clone rebar3
138 git:
139 repo: 'https://github.com/erlang/rebar3.git'
140 dest: /tmp/rebar3
141
142 - name: Bootstrap rebar3
143 command: ./bootstrap
144 args:
145 chdir: /tmp/rebar3
146
Jessica Wagantall79c77662018-08-21 14:16:28 -0700147 - name: Install rebar3 to bin
148 copy:
149 src: /tmp/rebar3/rebar3
150 dest: /usr/bin/rebar3
Jessica Wagantallb4cf59a2018-08-24 12:17:49 -0700151 mode: 0755
Jessica Wagantall79c77662018-08-21 14:16:28 -0700152 remote_src: true
Jessica Wagantall58744aa2018-08-21 17:48:03 -0700153 become: true
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700154
155 - name: Remove unused rebar3 source
156 file:
157 path: /tmp/rebar3
158 state: absent
Jessica Wagantall49f835a2018-08-23 15:08:54 -0700159
160 - name: Download geckodriver
161 unarchive:
162 src: https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
163 dest: /usr/bin
Jessica Wagantallb4cf59a2018-08-24 12:17:49 -0700164 mode: 0755
Jessica Wagantall49f835a2018-08-23 15:08:54 -0700165 remote_src: yes
166 become: true
Jessica Wagantallc944ef02018-08-30 17:53:11 -0700167
168 - name: Download Firefox version 55.0.3
169 unarchive:
170 src: https://download-installer.cdn.mozilla.net/pub/firefox/releases/55.0.3/linux-x86_64/en-US/firefox-55.0.3.tar.bz2
171 dest: /tmp
172 mode: 0755
173 remote_src: yes
174 become: true
175
176 - name: Create symbolic link to firefox bin
177 file:
178 src: "/usr/bin/firefox-bin/firefox/firefox"
179 dest: "/usr/bin/firefox"
180 state: link
181 become: true