Add ensure-twine role
Change-Id: Ic00e4f0c08fc42ce9d68f39be8522b6c2bba6396
This commit is contained in:
parent
247a690715
commit
e14a0d9285
18
roles/ensure-twine/tasks/main.yaml
Normal file
18
roles/ensure-twine/tasks/main.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
- name: Check for twine install
|
||||
command: which twine
|
||||
ignore_errors: yes
|
||||
register: register_twine
|
||||
|
||||
- name: Set pypi_twine_executable
|
||||
set_fact:
|
||||
pypi_twine_executable: "{{ register_twine.stdout }}"
|
||||
when: register_twine|succeeded
|
||||
|
||||
- name: Ensure twine is installed
|
||||
command: pip install twine --user
|
||||
when: pypi_twine_executable is not defined
|
||||
|
||||
- name: Set pypi twine executable
|
||||
set_fact:
|
||||
pypi_twine_executable: ~/.local/bin/twine
|
||||
when: pypi_twine_executable is not defined
|
Loading…
Reference in New Issue
Block a user