OpenStack nodes pre-install bindep, but other nodes may not. Check to see if bindep is on the node. If so, use it. If not, make a temp dir that we remove at the end of the role and install bindep into a virtualenv in that tempdir. Change-Id: I3f34c178254add2143dc7f1b9758844480d7d914
16 lines
344 B
YAML
16 lines
344 B
YAML
- name: create temp dir for bindep
|
|
tempfile:
|
|
state: directory
|
|
prefix: bindep
|
|
register: bindep_temp_dir
|
|
notify:
|
|
- remove bindep temp dir
|
|
|
|
- name: install bindep into temporary venv
|
|
pip:
|
|
name: bindep
|
|
virtualenv: "{{ bindep_temp_dir }}/venv"
|
|
|
|
- set_fact:
|
|
bindep_found_command: "{{ bindep_temp_dir }}/venv/bin/bindep"
|