From ba2a4a0787d4f47041745ed1d9044d09ede67fc0 Mon Sep 17 00:00:00 2001 From: Jack Ivanov Date: Tue, 3 Sep 2019 11:50:21 +0200 Subject: [PATCH] Verify Python version --- docs/troubleshooting.md | 4 ++++ main.yml | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 58c25d7..5ad5f6d 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -36,6 +36,10 @@ First of all, check [this](https://github.com/trailofbits/algo#features) and ens Look here if you have a problem running the installer to set up a new Algo server. +### Python version is not supported + +The minimum Python version required to run Algo is 3.6. Most modern operation systems should have it by default, but if the OS you are using doesn't meet the requirements, you have to upgrade. See the official documentation for your OS, or manual download it from https://www.python.org/downloads/. Otherwise, you may [deploy from docker](deploy-from-docker.md) + ### Error: "You have not agreed to the Xcode license agreements" On macOS, you tried to install the dependencies with pip and encountered the following error: diff --git a/main.yml b/main.yml index 2d5d1a5..d317430 100644 --- a/main.yml +++ b/main.yml @@ -17,7 +17,15 @@ when: '"ansible" in item' with_items: "{{ lookup('file', 'requirements.txt').splitlines() }}" - - name: Verify Ansible meets Algo VPN requirements. + - name: Verify Python meets Algo VPN requirements + assert: + that: (ansible_python.version.major|string + '.' + ansible_python.version.minor|string)|float is version('3.6', '>=') + msg: > + Python version is not supported. + You must upgrade to at least Python 3.6 to use this version of Algo. + See for more details - https://trailofbits.github.io/algo/troubleshooting.html#python-version-is-not-supported + + - name: Verify Ansible meets Algo VPN requirements assert: that: - ansible_version.full is version(required_ansible_version.ver, required_ansible_version.op)