From 384ac5cd3bbcdf90c58dc9df175ee3818fa596db Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Wed, 6 Mar 2019 20:35:39 +0100
Subject: [PATCH] Require ansible>=2.5 to use k8s resource

---
 README.md                                       | 8 +++++++-
 ansible/group_vars/cluster/settings.yml.example | 2 ++
 ansible/requirements.txt                        | 2 ++
 test/requirements.txt                           | 2 +-
 4 files changed, 12 insertions(+), 2 deletions(-)
 create mode 100644 ansible/requirements.txt

diff --git a/README.md b/README.md
index c19bb5708..db5dadb4a 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,13 @@ a Docker image) which contains utilities to manage your cluster.
 
 * You need to have ssh access (either as root, or as another user that can
   `sudo`) to the machines that will make up your cluster.
-* You need `ansible >= 2.4` installed on your workstation to run the bootstrap scripts.
+* You need `ansible >= 2.5` installed on your workstation to run the bootstrap
+  scripts. Install the requirements like this:
+
+    `pip3 install --user -r ansible/requirements.txt`
+
+  Hint: If you get a [segmentation fault](https://bitbucket.org/cffi/cffi/issues/272/segfault-while-installing-via-pip)
+  using above command, you can add `--no-use-wheel` to it.
 
 ## Bootstrapping a new cluster
 
diff --git a/ansible/group_vars/cluster/settings.yml.example b/ansible/group_vars/cluster/settings.yml.example
index 30b6ab259..57a25f341 100644
--- a/ansible/group_vars/cluster/settings.yml.example
+++ b/ansible/group_vars/cluster/settings.yml.example
@@ -1,3 +1,5 @@
+# Use python3 on cluster nodes for ansible
+ansible_python_interpreter: "/usr/bin/env python3"
 # External ip address of the cluster.
 ip_address: "203.0.113.6"
 # Main domain name of the cluster services.
diff --git a/ansible/requirements.txt b/ansible/requirements.txt
new file mode 100644
index 000000000..97ff75607
--- /dev/null
+++ b/ansible/requirements.txt
@@ -0,0 +1,2 @@
+# ansible>=2.5 is needed for using the `helm` resource
+ansible>=2.5
diff --git a/test/requirements.txt b/test/requirements.txt
index f8ec3cf5e..989a5e961 100644
--- a/test/requirements.txt
+++ b/test/requirements.txt
@@ -1,4 +1,4 @@
-ansible>=2.4
+ansible>=2.5
 behave-webdriver>=0.2.2
 psutil>=5.5.0
 pytest>=4.3.0
-- 
GitLab