Browse Source

Merge "Fix bindep path"

tags/2.8.1
Zuul 9 months ago
parent
commit
522058c65d
1 changed files with 17 additions and 7 deletions
  1. 17
    7
      playbooks/bindep-fallback/run.yaml

+ 17
- 7
playbooks/bindep-fallback/run.yaml View File

@@ -1,5 +1,9 @@
1 1
 - hosts: all
2
-  pre_tasks:
2
+  vars:
3
+    bindep_profile: test
4
+    # Define the global file so that no local file gets used.
5
+    bindep_file: /usr/local/bindep-fallback/bindep-fallback.txt
6
+  tasks:
3 7
     - name: Install requirements
4 8
       pip:
5 9
         chdir: "{{ zuul_work_dir }}"
@@ -12,9 +16,15 @@
12 16
         virtualenv: "{{ zuul_work_virtualenv }}"
13 17
         name: .
14 18
 
15
-  roles:
16
-    - role: bindep
17
-      bindep_profile: test
18
-      bindep_command: "{{ zuul_work_virtualenv }}/bin/bindep"
19
-      # Define the global file so that no local file gets used.
20
-      bindep_file: /usr/local/bindep-fallback/bindep-fallback.txt
19
+    - name: Run bindep with the file
20
+      command: "{{ zuul_work_virtualenv }}/bin/bindep -b -f {{ bindep_file }} {{ bindep_profile }}"
21
+      register: _bindep_output
22
+      changed_when: false
23
+      failed_when: false
24
+
25
+    - name: Install distro packages from bindep
26
+      package:
27
+        name: "{{ _bindep_output.stdout_lines }}"
28
+        state: present
29
+      become: yes
30
+      when: _bindep_output.stdout_lines

Loading…
Cancel
Save