config-download: rename pre/post deployment hostvars

We can't have numbers starting an Ansible var, so we need to rename the
pre/post deployments host vars, or we hit this error:
  template error while templating string: expected token 'end of print statement'

https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#creating-valid-variable-names

In this patch we have to duplicate host vars but it'll be cleaned up
once we change to the new file in THT.

Change-Id: Idbdd6a21eb2cd488daa1e3ddc844b4fc5267047c
Related-Bug: #1842141
(cherry picked from commit 21754e9987)
(cherry picked from commit 44da685cb0)
(cherry picked from commit 74991a643a)
This commit is contained in:
Emilien Macchi 2019-08-30 17:00:07 -04:00
parent 8b6830f5bb
commit 300074ee2b
3 changed files with 30 additions and 0 deletions

View File

@ -3,8 +3,22 @@
- {{ deployment }}
{% endfor %}
# Temporary duplication
# https://bugs.launchpad.net/tripleo/+bug/1842141
pre_deployments_{{ role }}: {% if not pre_deployments %} [] {% endif %}
{% for deployment in pre_deployments %}
- {{ deployment }}
{% endfor %}
{{ role }}_post_deployments: {% if not post_deployments %} [] {% endif %}
{% for deployment in post_deployments %}
- {{ deployment }}
{% endfor %}
post_deployments_{{ role }}: {% if not post_deployments %} [] {% endif %}
{% for deployment in post_deployments %}
- {{ deployment }}
{% endfor %}

View File

@ -5,3 +5,11 @@ Compute_pre_deployments:
- AnsibleDeployment
Compute_post_deployments: []
pre_deployments_Compute:
- ComputeHostEntryDeployment
- NetworkDeployment
- MyExtraConfigPost
- AnsibleDeployment
post_deployments_Compute: []

View File

@ -5,3 +5,11 @@ Controller_pre_deployments:
- MyExtraConfigPost
Controller_post_deployments: []
pre_deployments_Controller:
- ControllerHostEntryDeployment
- NetworkDeployment
- MyPostConfig
- MyExtraConfigPost
post_deployments_Controller: []