Refactor ensure-twine
This didn't work as expected on executor. So, now pip install depending on the rc status of which. Change-Id: Icd9da523d220973c66bc7cb4fbbd9999ec6c0dd0 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
ebb63896ab
commit
4c9a13df88
@ -1,18 +1,16 @@
|
|||||||
- name: Check for twine install
|
- name: Check for twine install
|
||||||
command: which twine
|
command: which twine
|
||||||
ignore_errors: yes
|
failed_when: false
|
||||||
register: register_twine
|
register: register_twine
|
||||||
|
|
||||||
- name: Set pypi_twine_executable
|
- name: Set pypi_twine_executable
|
||||||
set_fact:
|
set_fact:
|
||||||
pypi_twine_executable: "{{ register_twine.stdout }}"
|
pypi_twine_executable: "{{ register_twine.stdout }}"
|
||||||
when: register_twine|succeeded
|
when: register_twine.rc == 0
|
||||||
|
|
||||||
- name: Ensure twine is installed
|
- name: Ensure twine is installed
|
||||||
command: pip install twine --user
|
block:
|
||||||
when: pypi_twine_executable is not defined
|
- command: pip install twine --user
|
||||||
|
- set_fact:
|
||||||
- name: Set pypi twine executable
|
pypi_twine_executable: ~/.local/bin/twine
|
||||||
set_fact:
|
when: register_twine.rc != 0
|
||||||
pypi_twine_executable: ~/.local/bin/twine
|
|
||||||
when: pypi_twine_executable is not defined
|
|
||||||
|
Loading…
Reference in New Issue
Block a user