Doug Hellmann 125eeed6fe 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>
2018-11-08 14:06:07 -05:00

20 lines
554 B
YAML

- name: Check for twine install
command: which twine
failed_when: false
register: register_twine
- name: Set pypi_twine_executable
set_fact:
pypi_twine_executable: "{{ register_twine.stdout }}"
when: register_twine.rc == 0
- name: Ensure twine is installed
block:
- name: Ensure twine is installed
command: "{{ twine_python }} -m pip install twine!=1.12.0 readme_renderer[md]!=23.0 --user"
- name: Set pypi_twine_executable
set_fact:
pypi_twine_executable: ~/.local/bin/twine
when: register_twine.rc != 0