From 25313a97de47c86643808149b4e45ee8ffd027ac Mon Sep 17 00:00:00 2001 From: NGTmeaty Date: Tue, 2 Jun 2020 03:26:33 -0400 Subject: [PATCH] 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. --- ansible/roles/brozzler-worker/tasks/main.yml | 18 +++++++++++++++++- ansible/roles/rethinkdb/tasks/main.yml | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ansible/roles/brozzler-worker/tasks/main.yml b/ansible/roles/brozzler-worker/tasks/main.yml index 4945052..219399a 100644 --- a/ansible/roles/brozzler-worker/tasks/main.yml +++ b/ansible/roles/brozzler-worker/tasks/main.yml @@ -58,7 +58,23 @@ - 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 diff --git a/ansible/roles/rethinkdb/tasks/main.yml b/ansible/roles/rethinkdb/tasks/main.yml index b24414e..9a310ea 100644 --- a/ansible/roles/rethinkdb/tasks/main.yml +++ b/ansible/roles/rethinkdb/tasks/main.yml @@ -1,10 +1,10 @@ --- - name: ensure rethinkdb apt public key is trusted - apt_key: url=http://download.rethinkdb.com/apt/pubkey.gpg + apt_key: url=https://download.rethinkdb.com/repository/raw/pubkey.gpg become: true - name: ensure rethinkdb repo is in apt sources.list apt_repository: - repo: 'deb http://download.rethinkdb.com/apt {{ansible_lsb.codename|lower}} main' + repo: 'deb https://download.rethinkdb.com/repository/ubuntu-{{ansible_lsb.codename|lower}} {{ansible_lsb.codename|lower}} main' state: present become: true - apt: update_cache=yes