NGTmeaty 25313a97de
Fix tests:
Update the RethinkDB pubkey location and repo location based on their guide https://rethinkdb.com/docs/install/ubuntu/
Numpy has updated to no longer support 3.5, on 3.5, we should install a earlier version of Numpy to maintain compatibility.
2020-06-02 03:26:33 -04:00

122 lines
3.1 KiB
YAML

---
- name: ensure canonical partner repo is in apt sources.list
apt_repository: repo='deb http://archive.canonical.com/ubuntu trusty partner'
state=present
become: true
- apt: update_cache=yes
become: true
- name: ensure required packages are installed
become: true
apt: name={{item}} state=present
with_items:
- chromium-browser
- vnc4server
- libjpeg-turbo8-dev
- zlib1g-dev
- gcc
- python3-dev
- python3-dbg
- adobe-flashplugin
- xfonts-base
- fonts-arphic-bkai00mp
- fonts-arphic-bsmi00lp
- fonts-arphic-gbsn00lp
- fonts-arphic-gkai00mp
- fonts-arphic-ukai
- fonts-farsiweb
- fonts-nafees
- fonts-sil-abyssinica
- fonts-sil-ezra
- fonts-sil-padauk
- fonts-unfonts-extra
- fonts-unfonts-core
- fonts-indic
- fonts-thai-tlwg
- fonts-lklug-sinhala
- name: mkdir /etc/service/{Xvnc,vnc-websock,brozzler-worker}
file:
path: '/etc/service/{{item}}'
state: directory
with_items:
- Xvnc
- vnc-websock
- brozzler-worker
become: true
- name: install /etc/service/Xvnc/run
template:
src: templates/Xvnc-run.j2
dest: /etc/service/Xvnc/run
mode: 0755
notify:
- restart Xvnc
become: true
- name: mkdir {{venv_root}}/websockify-ve3
become: true
file: path={{venv_root}}/websockify-ve3 state=directory owner={{user}}
#get python3 version for checks below
- shell: "python --version"
register: python_installed
#websockify's dependency numpy's latest version no longer supports 3.5
- name: install old version of numpy for websockify
pip:
name: numpy==1.18.4
virtualenv: '{{venv_root}}/websockify-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
when: '"Python 3.5" in python_installed.stdout'
- name: install websockify in virtualenv
pip:
name: git+https://github.com/kanaka/websockify.git#egg=websockify
virtualenv: '{{venv_root}}/websockify-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
- name: install /etc/service/vnc-websock/run
template:
src: templates/vnc-websock-run.j2
dest: /etc/service/vnc-websock/run
mode: 0755
notify:
- restart vnc-websock
become: true
- name: mkdir {{venv_root}}/brozzler-ve3
become: true
file: path={{venv_root}}/brozzler-ve3 state=directory owner={{user}}
- name: install brozzler in virtualenv
pip:
name: '{{brozzler_pip_name}}'
virtualenv: '{{venv_root}}/brozzler-ve3'
virtualenv_python: python3
virtualenv_command: python3 /usr/lib/python3/dist-packages/virtualenv.py
extra_args: '--no-input --upgrade --pre --cache-dir=/tmp/pip-cache'
become: true
become_user: '{{user}}'
notify:
- restart brozzler-worker
- name: install /etc/service/brozzler-worker/run
template:
src: templates/brozzler-worker-run.j2
dest: /etc/service/brozzler-worker/run
mode: 0755
notify:
- restart brozzler-worker
become: true