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: |
Jessica Wagantall | 5db567b | 2018-08-16 20:26:42 -0700 | [diff] [blame] | 8 | apt_file: /etc/apt/sources.list.d/google-chrome.list |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 9 | 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 Wagantall | 564913e | 2018-03-19 13:41:33 -0700 | [diff] [blame] | 14 | |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 15 | tasks: |
| 16 | - name: 'Install Docker Compose {{docker_compose_version}}' |
Jessica Wagantall | 096164e | 2018-08-15 10:07:47 -0700 | [diff] [blame] | 17 | 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 Wagantall | 564913e | 2018-03-19 13:41:33 -0700 | [diff] [blame] | 18 | become: true |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 19 | |
Jessica Wagantall | 5826a6a | 2018-08-11 23:38:07 -0700 | [diff] [blame] | 20 | - file: |
| 21 | path: /usr/local/bin/docker-compose |
| 22 | mode: "+x" |
Jessica Wagantall | dbadc48 | 2018-08-13 14:13:57 -0700 | [diff] [blame] | 23 | become: true |
Jessica Wagantall | 5826a6a | 2018-08-11 23:38:07 -0700 | [diff] [blame] | 24 | |
Jessica Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 25 | - 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 Wagantall | b4acd42 | 2018-09-05 13:38:55 -0700 | [diff] [blame] | 38 | - 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 Wagantall | 0cd3700 | 2018-03-27 16:14:46 -0700 | [diff] [blame] | 43 | become: true |
Jessica Wagantall | 19ce2f5 | 2018-08-08 12:25:08 -0700 | [diff] [blame] | 44 | |
| 45 | - name: Install libxml2-utils |
| 46 | apt: |
| 47 | name: libxml2-utils |
| 48 | state: present |
| 49 | become: true |
Jessica Wagantall | 7f93ce0 | 2018-08-09 19:41:49 -0700 | [diff] [blame] | 50 | |
| 51 | - name: Install python-tox |
| 52 | apt: |
| 53 | name: python-tox |
| 54 | state: present |
| 55 | become: true |
Jessica Wagantall | 42bf827 | 2018-08-09 22:02:42 -0700 | [diff] [blame] | 56 | |
| 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 Wagantall | 3fc37fe | 2018-08-10 00:16:16 -0700 | [diff] [blame] | 77 | |
| 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 Wagantall | 3fc37fe | 2018-08-10 00:16:16 -0700 | [diff] [blame] | 96 | - xmlstarlet |
| 97 | - xvfb |
| 98 | - crudini |
| 99 | - maven |
| 100 | - python-ncclient |
| 101 | become: true |
Jessica Wagantall | 5db567b | 2018-08-16 20:26:42 -0700 | [diff] [blame] | 102 | |
| 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 Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 108 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | 5db567b | 2018-08-16 20:26:42 -0700 | [diff] [blame] | 109 | |
| 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 Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 113 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | 5db567b | 2018-08-16 20:26:42 -0700 | [diff] [blame] | 114 | |
| 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 Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 124 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 125 | |
Jessica Wagantall | 6e96b2e | 2018-08-21 14:38:37 -0700 | [diff] [blame] | 126 | - name: Install Erlang dependency packages |
| 127 | apt: |
| 128 | name: |
| 129 | - libwxgtk3.0-0v5 |
| 130 | - libsctp1 |
| 131 | - libwxbase3.0-0v5 |
| 132 | become: true |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 133 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | 6e96b2e | 2018-08-21 14:38:37 -0700 | [diff] [blame] | 134 | |
| 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 Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 140 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | 6e96b2e | 2018-08-21 14:38:37 -0700 | [diff] [blame] | 141 | |
Jessica Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 142 | - name: Clone rebar3 |
| 143 | git: |
| 144 | repo: 'https://github.com/erlang/rebar3.git' |
| 145 | dest: /tmp/rebar3 |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 146 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 147 | |
| 148 | - name: Bootstrap rebar3 |
| 149 | command: ./bootstrap |
| 150 | args: |
| 151 | chdir: /tmp/rebar3 |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 152 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 153 | |
Jessica Wagantall | 79c7766 | 2018-08-21 14:16:28 -0700 | [diff] [blame] | 154 | - name: Install rebar3 to bin |
| 155 | copy: |
| 156 | src: /tmp/rebar3/rebar3 |
| 157 | dest: /usr/bin/rebar3 |
Jessica Wagantall | b4cf59a | 2018-08-24 12:17:49 -0700 | [diff] [blame] | 158 | mode: 0755 |
Jessica Wagantall | 79c7766 | 2018-08-21 14:16:28 -0700 | [diff] [blame] | 159 | remote_src: true |
Jessica Wagantall | 58744aa | 2018-08-21 17:48:03 -0700 | [diff] [blame] | 160 | become: true |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 161 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 162 | |
| 163 | - name: Remove unused rebar3 source |
| 164 | file: |
| 165 | path: /tmp/rebar3 |
| 166 | state: absent |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 167 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | 49f835a | 2018-08-23 15:08:54 -0700 | [diff] [blame] | 168 | |
| 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 Wagantall | b4cf59a | 2018-08-24 12:17:49 -0700 | [diff] [blame] | 173 | mode: 0755 |
Jessica Wagantall | 49f835a | 2018-08-23 15:08:54 -0700 | [diff] [blame] | 174 | remote_src: yes |
| 175 | become: true |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 176 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | c944ef0 | 2018-08-30 17:53:11 -0700 | [diff] [blame] | 177 | |
| 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 Wagantall | bbdb4d6 | 2018-09-24 18:21:48 -0700 | [diff] [blame] | 181 | dest: /opt |
Jessica Wagantall | c944ef0 | 2018-08-30 17:53:11 -0700 | [diff] [blame] | 182 | mode: 0755 |
| 183 | remote_src: yes |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 184 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | c944ef0 | 2018-08-30 17:53:11 -0700 | [diff] [blame] | 185 | become: true |
| 186 | |
| 187 | - name: Create symbolic link to firefox bin |
| 188 | file: |
Jessica Wagantall | bbdb4d6 | 2018-09-24 18:21:48 -0700 | [diff] [blame] | 189 | src: "/opt/firefox/firefox" |
Jessica Wagantall | c944ef0 | 2018-08-30 17:53:11 -0700 | [diff] [blame] | 190 | dest: "/usr/bin/firefox" |
| 191 | state: link |
Jessica Wagantall | e41a687 | 2018-10-30 19:44:19 -0700 | [diff] [blame] | 192 | when: "'x86_64' in ansible_architecture" |
Jessica Wagantall | c944ef0 | 2018-08-30 17:53:11 -0700 | [diff] [blame] | 193 | become: true |