From 60328fef8c342421f8b02f5de68b86996810ae6b Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Tue, 5 Sep 2017 16:21:14 +1000 Subject: [PATCH] Only do the bindep_command if bindep_file is defined If there is no bindep file at all in the repository (which is likely because tox depends on bindep and won't always be useful) then bindep_file is never set. Then when the set_face bindep_command comes around it tries to reference the unset bindep_file and fails. Change-Id: I7be6be88209810eed715daaa4bb41315e838272d Signed-off-by: Jamie Lennox --- roles/bindep/tasks/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/bindep/tasks/main.yaml b/roles/bindep/tasks/main.yaml index 36db2720c..2960dbd95 100644 --- a/roles/bindep/tasks/main.yaml +++ b/roles/bindep/tasks/main.yaml @@ -27,6 +27,7 @@ - name: Define bindep_command fact set_fact: bindep_run: "{{ bindep_command }} -b -f {{ bindep_file }} {{ bindep_profile }}" + when: bindep_file is defined - include: packages.yaml when: bindep_file is defined