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 |
| 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 Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 122 | |
Jessica Wagantall | 6e96b2e | 2018-08-21 14:38:37 -0700 | [diff] [blame] | 123 | - 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 Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 137 | - 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 Wagantall | 79c7766 | 2018-08-21 14:16:28 -0700 | [diff] [blame] | 147 | - name: Install rebar3 to bin |
| 148 | copy: |
| 149 | src: /tmp/rebar3/rebar3 |
| 150 | dest: /usr/bin/rebar3 |
Jessica Wagantall | b4cf59a | 2018-08-24 12:17:49 -0700 | [diff] [blame] | 151 | mode: 0755 |
Jessica Wagantall | 79c7766 | 2018-08-21 14:16:28 -0700 | [diff] [blame] | 152 | remote_src: true |
Jessica Wagantall | 58744aa | 2018-08-21 17:48:03 -0700 | [diff] [blame] | 153 | become: true |
Jessica Wagantall | ba4a03d | 2018-08-21 12:11:32 -0700 | [diff] [blame] | 154 | |
| 155 | - name: Remove unused rebar3 source |
| 156 | file: |
| 157 | path: /tmp/rebar3 |
| 158 | state: absent |
Jessica Wagantall | 49f835a | 2018-08-23 15:08:54 -0700 | [diff] [blame] | 159 | |
| 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 Wagantall | b4cf59a | 2018-08-24 12:17:49 -0700 | [diff] [blame] | 164 | mode: 0755 |
Jessica Wagantall | 49f835a | 2018-08-23 15:08:54 -0700 | [diff] [blame] | 165 | remote_src: yes |
| 166 | become: true |
Jessica Wagantall | c944ef0 | 2018-08-30 17:53:11 -0700 | [diff] [blame] | 167 | |
| 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 |