zuul-jobs/roles/bindep/tasks/packages.yaml
Sorin Sbarnea a73d432078 bindep: Fixed runtime warnings
Resolve few ansible runtime warnings.

Change-Id: I3e2d5ec3b5b1fc6bbfaded4b8bece035f9880517
2020-08-24 18:32:16 +01:00

26 lines
752 B
YAML

- name: Get list of packages to install from bindep
command: "{{ bindep_run }}"
register: bindep_output
failed_when: false
changed_when: false
- name: Install distro packages from bindep
package:
name: "{{ bindep_output.stdout_lines }}"
state: present
become: true
when: bindep_output.stdout_lines
changed_when: true
- name: Check that packages are installed
command: "{{ bindep_run }}"
register: bindep_final_check
# Ignore errors then fail later so that we can give a better error message
failed_when: false
changed_when: false
- name: Fail if we cannot install all packages
fail:
msg: "bindep failed to install from {{ bindep_file }} - {{ bindep_final_check.stdout }}"
when: bindep_final_check is failed