zuul-jobs/roles/bindep/tasks/find.yaml
Paul Belanger 829297c37a
Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.

Fix variable linting issues and ignore ANSIBLE0012.

Change-Id: I07aa940245e700c9f08df0f1920720f0ed9d3de0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 16:50:06 -04:00

34 lines
1.0 KiB
YAML

- name: Look for bindep.txt
stat:
path: "{{ bindep_dir }}/bindep.txt"
register: bindep_file_stat
- name: Define bindep_file fact
set_fact:
bindep_file: "{{ bindep_file_stat.stat.path }}"
when: bindep_file_stat.stat.exists
- name: Look for other-requirements.txt
stat:
path: "{{ bindep_dir }}/other-requirements.txt"
register: bindep_other_file_stat
when: not bindep_file_stat.stat.exists
- name: Define bindep_file fact
set_fact:
bindep_file: "{{ bindep_other_file_stat.stat.path }}"
when: not bindep_other_file_stat|skipped and bindep_other_file_stat.stat.exists
- name: Look for bindep fallback file
stat:
path: "{{ bindep_fallback }}"
register: bindep_fallback_file_stat
when: bindep_fallback is defined
and not bindep_other_file_stat|skipped
and not bindep_other_file_stat.stat.exists
- name: Define bindep_file fact
set_fact:
bindep_file: "{{ bindep_fallback_file_stat.stat.path }}"
when: not bindep_fallback_file_stat|skipped and bindep_fallback_file_stat.stat.exists