summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2018-11-08 14:06:07 -0500
committerDoug Hellmann <doug@doughellmann.com>2018-11-08 14:06:07 -0500
commit125eeed6fe76b79d9ca63e720941137f539659fa (patch)
treeb003418623595629cc6c2be4acc0c314889c27c2
parentce5c415b25c9d274faf896a94e1fb0e72ea989f4 (diff)
enable setting python version for ensure-twine
Add twine_python so we can control the version of python used to install twine. Change-Id: I36ddbdf78f549ddc022cce86f3ada9631fb19c37 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Notes
Notes (review): Code-Review+1: Aakarsh <agopi@redhat.com> Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: Andreas Jaeger <jaegerandi@gmail.com> Workflow+1: Andreas Jaeger <jaegerandi@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 08 Nov 2018 21:16:58 +0000 Reviewed-on: https://review.openstack.org/616673 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-rw-r--r--roles/ensure-twine/README.rst8
-rw-r--r--roles/ensure-twine/defaults/main.yaml2
-rw-r--r--roles/ensure-twine/tasks/main.yaml2
3 files changed, 11 insertions, 1 deletions
diff --git a/roles/ensure-twine/README.rst b/roles/ensure-twine/README.rst
index f9dac2c..64e4f51 100644
--- a/roles/ensure-twine/README.rst
+++ b/roles/ensure-twine/README.rst
@@ -1 +1,9 @@
1Ensure twine is installed. 1Ensure twine is installed.
2
3**Role Variables**
4
5.. zuul:rolevar:: twine_python
6 :default: python
7
8 The python interpreter to use to install twine if it is not already
9 installed. Set it to "python3" to use python 3, for example.
diff --git a/roles/ensure-twine/defaults/main.yaml b/roles/ensure-twine/defaults/main.yaml
new file mode 100644
index 0000000..76ec8b9
--- /dev/null
+++ b/roles/ensure-twine/defaults/main.yaml
@@ -0,0 +1,2 @@
1---
2twine_python: python
diff --git a/roles/ensure-twine/tasks/main.yaml b/roles/ensure-twine/tasks/main.yaml
index e83a0d5..c7c2832 100644
--- a/roles/ensure-twine/tasks/main.yaml
+++ b/roles/ensure-twine/tasks/main.yaml
@@ -11,7 +11,7 @@
11- name: Ensure twine is installed 11- name: Ensure twine is installed
12 block: 12 block:
13 - name: Ensure twine is installed 13 - name: Ensure twine is installed
14 command: pip install twine!=1.12.0 readme_renderer[md]!=23.0 --user 14 command: "{{ twine_python }} -m pip install twine!=1.12.0 readme_renderer[md]!=23.0 --user"
15 15
16 - name: Set pypi_twine_executable 16 - name: Set pypi_twine_executable
17 set_fact: 17 set_fact: