31 lines
923 B
YAML
31 lines
923 B
YAML
- hosts: all
|
|
vars:
|
|
bindep_profile: test
|
|
# Define the global file so that no local file gets used.
|
|
bindep_file: /usr/local/bindep-fallback/bindep-fallback.txt
|
|
tasks:
|
|
- name: Install requirements
|
|
pip:
|
|
chdir: "{{ zuul_work_dir }}"
|
|
virtualenv: "{{ zuul_work_virtualenv }}"
|
|
requirements: requirements.txt
|
|
|
|
- name: Install the project from source
|
|
pip:
|
|
chdir: "{{ zuul_work_dir }}"
|
|
virtualenv: "{{ zuul_work_virtualenv }}"
|
|
name: .
|
|
|
|
- name: Run bindep with the file
|
|
command: "{{ zuul_work_virtualenv }}/bin/bindep -b -f {{ bindep_file }} {{ bindep_profile }}"
|
|
register: _bindep_output
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Install distro packages from bindep
|
|
package:
|
|
name: "{{ _bindep_output.stdout_lines }}"
|
|
state: present
|
|
become: yes
|
|
when: _bindep_output.stdout_lines
|