Improve ensure-reno
Follow I1334ff1f469061884b222dd99e72a989d72c68be and fail if constraints_file contains a file name that does not exist. Change-Id: I220bddabf24be5773c835635473e4b90e474eb09
This commit is contained in:
parent
46411dc619
commit
7d47107a46
@ -6,13 +6,20 @@
|
||||
|
||||
- name: Check to see if the constraints file exists
|
||||
stat:
|
||||
path: "{{ constraints_file|default('missing') }}"
|
||||
path: "{{ constraints_file }}"
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
get_md5: false
|
||||
register: stat_results
|
||||
when: constraints_file is defined
|
||||
|
||||
- name: Fail if constraints file does not exist
|
||||
fail:
|
||||
msg: "Variable constraints_file is set but file does not exist."
|
||||
when:
|
||||
- constraints_file is defined
|
||||
- not stat_results|skipped and not stat_results.stat.exists
|
||||
|
||||
- name: Record file location
|
||||
set_fact:
|
||||
upper_constraints: "-c {{ constraints_file }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user