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)
This commit is contained in:
Emilien Macchi 2019-08-30 17:00:07 -04:00
parent a7a88099f5
commit 74991a643a
3 changed files with 30 additions and 0 deletions

View File

@ -3,12 +3,26 @@
- {{ 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 %}
{% for k,v in role_group_vars.items() %}
{{ k }}: {{ v }}
{% endfor %}

View File

@ -6,5 +6,13 @@ Compute_pre_deployments:
Compute_post_deployments: []
pre_deployments_Compute:
- ComputeHostEntryDeployment
- NetworkDeployment
- MyExtraConfigPost
- AnsibleDeployment
post_deployments_Compute: []
max_fail_percentage: 15
any_errors_fatal: yes

View File

@ -6,5 +6,13 @@ Controller_pre_deployments:
Controller_post_deployments: []
pre_deployments_Controller:
- ControllerHostEntryDeployment
- NetworkDeployment
- MyPostConfig
- MyExtraConfigPost
post_deployments_Controller: []
max_fail_percentage: 15
any_errors_fatal: yes