blob: bc7c19bc073ec85681fefc5a462b890cc0fafb7c [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
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700108 when: "'x86_64' in ansible_architecture"
Jessica Wagantall5db567b2018-08-16 20:26:42 -0700109
110 - name: Add Google Chrome repo
111 copy: content="deb http://dl.google.com/linux/chrome/deb/ stable main" dest={{apt_file}} owner=root group=root mode=644
112 become: true
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700113 when: "'x86_64' in ansible_architecture"
Jessica Wagantall5db567b2018-08-16 20:26:42 -0700114
115 - name: Update apt cache
116 apt: update_cache=yes
117 become: true
118
119 - name: Install Google Chrome
120 apt:
121 name: google-chrome-stable
122 state: present
123 become: true
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700124 when: "'x86_64' in ansible_architecture"
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700125
Jessica Wagantall6e96b2e2018-08-21 14:38:37 -0700126 - name: Install Erlang dependency packages
127 apt:
128 name:
129 - libwxgtk3.0-0v5
130 - libsctp1
131 - libwxbase3.0-0v5
132 become: true
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700133 when: "'x86_64' in ansible_architecture"
Jessica Wagantall6e96b2e2018-08-21 14:38:37 -0700134
135 - name: Install Erlang
136 apt:
137 deb: https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.3.6-1~ubuntu~trusty_amd64.deb
138 install_recommends: yes
139 become: true
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700140 when: "'x86_64' in ansible_architecture"
Jessica Wagantall6e96b2e2018-08-21 14:38:37 -0700141
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700142 - name: Clone rebar3
143 git:
144 repo: 'https://github.com/erlang/rebar3.git'
145 dest: /tmp/rebar3
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700146 when: "'x86_64' in ansible_architecture"
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700147
148 - name: Bootstrap rebar3
149 command: ./bootstrap
150 args:
151 chdir: /tmp/rebar3
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700152 when: "'x86_64' in ansible_architecture"
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700153
Jessica Wagantall79c77662018-08-21 14:16:28 -0700154 - name: Install rebar3 to bin
155 copy:
156 src: /tmp/rebar3/rebar3
157 dest: /usr/bin/rebar3
Jessica Wagantallb4cf59a2018-08-24 12:17:49 -0700158 mode: 0755
Jessica Wagantall79c77662018-08-21 14:16:28 -0700159 remote_src: true
Jessica Wagantall58744aa2018-08-21 17:48:03 -0700160 become: true
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700161 when: "'x86_64' in ansible_architecture"
Jessica Wagantallba4a03d2018-08-21 12:11:32 -0700162
163 - name: Remove unused rebar3 source
164 file:
165 path: /tmp/rebar3
166 state: absent
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700167 when: "'x86_64' in ansible_architecture"
Jessica Wagantall49f835a2018-08-23 15:08:54 -0700168
169 - name: Download geckodriver
170 unarchive:
171 src: https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
172 dest: /usr/bin
Jessica Wagantallb4cf59a2018-08-24 12:17:49 -0700173 mode: 0755
Jessica Wagantall49f835a2018-08-23 15:08:54 -0700174 remote_src: yes
175 become: true
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700176 when: "'x86_64' in ansible_architecture"
Jessica Wagantallc944ef02018-08-30 17:53:11 -0700177
178 - name: Download Firefox version 55.0.3
179 unarchive:
180 src: https://download-installer.cdn.mozilla.net/pub/firefox/releases/55.0.3/linux-x86_64/en-US/firefox-55.0.3.tar.bz2
Jessica Wagantallbbdb4d62018-09-24 18:21:48 -0700181 dest: /opt
Jessica Wagantallc944ef02018-08-30 17:53:11 -0700182 mode: 0755
183 remote_src: yes
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700184 when: "'x86_64' in ansible_architecture"
Jessica Wagantallc944ef02018-08-30 17:53:11 -0700185 become: true
186
187 - name: Create symbolic link to firefox bin
188 file:
Jessica Wagantallbbdb4d62018-09-24 18:21:48 -0700189 src: "/opt/firefox/firefox"
Jessica Wagantallc944ef02018-08-30 17:53:11 -0700190 dest: "/usr/bin/firefox"
191 state: link
Jessica Wagantalle41a6872018-10-30 19:44:19 -0700192 when: "'x86_64' in ansible_architecture"
Jessica Wagantallc944ef02018-08-30 17:53:11 -0700193 become: true