zuul-jobs/roles/bindep/tasks/packages.yaml
Jeremy Stanley 2711d10186 Be consistent about spaces before and after vars
With the arrival of ansible-lint 4, Jinja2 variable expansions must
include spaces before and after the variable name inside the
brackets.

Adjust the new violations accordingly and remove the rule
206 exclusion.

Change-Id: Ib3ff7b0233a5d5cf99772f9c2adc81861cf34ffa
2019-08-07 20:17:41 +01:00

23 lines
686 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