deploy-steps: use lookup() to get pre|post_deployments_role variables

Note: this patch is only for Stein and its previous versions.
Train and master are fine.

The syntax in place didn't allow to have an empty default for these 2
vars; which can happen in Queens if config-download is disabled.

Using the lookup module allows to set a default.

Change-Id: I38c658e0b0f2e334bd529fe66f937465036cc205
Closes-Bug: #1856314
(cherry picked from commit 44d2502383)
This commit is contained in:
Emilien Macchi 2019-12-13 08:59:26 -05:00
parent bc0bd3f151
commit 6192283616
1 changed files with 2 additions and 2 deletions

View File

@ -433,7 +433,7 @@ outputs:
- include_tasks: deployments.yaml
vars:
force: false
with_items: "{{ '{{' }} lookup('vars', 'pre_deployments_' + tripleo_role_name)|default([]) {{ '}}' }}"
with_items: "{{ '{{' }} lookup('vars', 'pre_deployments_' + tripleo_role_name, default=[]) {{ '}}' }}"
tags:
- overcloud
- pre_deploy_steps
@ -521,7 +521,7 @@ outputs:
- include_tasks: deployments.yaml
vars:
force: false
with_items: "{{ '{{' }} lookup('vars', 'post_deployments_' + tripleo_role_name)|default([]) {{ '}}' }}"
with_items: "{{ '{{' }} lookup('vars', 'post_deployments_' + tripleo_role_name, default=[]) {{ '}}' }}"
tags:
- overcloud
- post_deploy_steps