zuul-jobs/roles/bindep/tasks/find-bindep.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

20 lines
575 B
YAML

- name: Look for bindep command
stat:
path: "{{ bindep_command }}"
when: bindep_command is defined
register: bindep_command_stat
- name: Check for system bindep
command: /bin/bash -c "type -p bindep"
failed_when: false
register: bindep_command_type
when: >-
bindep_command is not defined
or bindep_command_stat is defined
and not bindep_command_stat.stat.exists
- name: Define bindep_command fact
set_fact:
bindep_command: "{{ bindep_command_type.stdout }}"
when: not bindep_command_type is skipped and bindep_command_type.rc == 0