zuul-jobs/roles/ensure-twine/tasks/main.yaml
Monty Taylor f6eb7b2fc8
Move name from block to tasks in the block
block allows adding a name - but it's not actually emitted anywhere in
the logging. So while this documents the source code, it's not reflected
in logging.

I just happened to learn this elsewhere.

Change-Id: I95362ed94418144e332f7289b1bfa5b2ade68de7
2017-08-30 17:30:38 -05:00

20 lines
496 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: pip install twine --user
- name: Set pypi_twine_executable
set_fact:
pypi_twine_executable: ~/.local/bin/twine
when: register_twine.rc != 0