From afba3b12bdce88e90dd1a1c08761fb164af22294 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Tue, 17 Oct 2017 17:33:14 +0100 Subject: [PATCH] Default pre_deployments/post_deployments to empty lists This is needed because these aren't defined by default when deploying without config-download-environment.yaml and https://review.openstack.org/#/c/508189/, but it's still useful to allow re-running the deploy steps for debugging, e.g: ansible-playbook -v -i /usr/bin/tripleo-ansible-inventory deploy_steps_playbook.yaml Currently this doesn't work anymore, because these variables are undefined. Change-Id: I2d99c1cb8bf4ccd8581e78d914d438e5de544219 --- common/deploy-steps.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 00009da053..489c221a1c 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -349,7 +349,7 @@ outputs: vars: force: false when: role_name == '{{role.name}}' - with_items: "{{ '{{' }} {{role.name}}_pre_deployments {{ '}}' }}" + with_items: "{{ '{{' }} {{role.name}}_pre_deployments|default([]) {{ '}}' }}" {%- endfor %} - hosts: overcloud name: Deployment steps @@ -372,7 +372,7 @@ outputs: vars: force: false when: role_name == '{{role.name}}' - with_items: "{{ '{{' }} {{role.name}}_post_deployments {{ '}}' }}" + with_items: "{{ '{{' }} {{role.name}}_post_deployments|default([]) {{ '}}' }}" {%- endfor %} update_steps_tasks: | {%- for role in roles %}