From 2fe22673612a983dbd9e00b9c74e5d737412987c Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 16 Nov 2016 13:19:28 +0000 Subject: [PATCH] Set a default for upper_constraints_check.status On occasion the Ansible URI module may not return a status key, so this patch ensures that even if it doesn't there will still be a value of '503' which translates into a 'Service Unavailable' error. Change-Id: Ie944152f56bd5c68cfd80d406cf4175e9723c8f6 --- playbooks/common-tasks/set-upper-constraints.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/common-tasks/set-upper-constraints.yml b/playbooks/common-tasks/set-upper-constraints.yml index 84ea54b50f..a6f27b0e23 100644 --- a/playbooks/common-tasks/set-upper-constraints.yml +++ b/playbooks/common-tasks/set-upper-constraints.yml @@ -29,4 +29,4 @@ set_fact: pip_install_upper_constraints: >- http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }} - when: upper_constraints_check.status != 200 + when: (upper_constraints_check.status | default(503)) != 200