zuul-jobs/roles/bindep/tasks/packages.yaml
Tristan Cacqueray e2058a6b75 Fix deprecation warning of ansible-2.5
This change fixes this upcoming deprecation warning:

[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
`result|skipped` instead use `result is skipped`. This feature will be removed
in version 2.9.

Change-Id: Ic0c93f2ea896ead76922694e6150882d8a280daf
2018-06-04 00:17:18 +00:00

23 lines
685 B
YAML

- name: Get list of packages to install from bindep
command: "{{ bindep_run }}"
register: bindep_output
failed_when: false
- name: Install distro packages from bindep
package:
name: "{{ bindep_output.stdout_lines }}"
state: present
become: yes
when: bindep_output.stdout_lines
- 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
- 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