aboutsummaryrefslogtreecommitdiffstats
path: root/overcloud.j2.yaml
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2016-09-21 11:10:47 +0100
committerSteven Hardy <shardy@redhat.com>2016-09-21 12:42:31 +0100
commit1e723337029b8ea77f12dd2d75a4a426570f1c63 (patch)
tree15a8f80c13cb8efdc50fa8cadc0c0b93b3f448ec /overcloud.j2.yaml
parentb40f1dc8c1d58e08092391d01ecb73682ab0abb6 (diff)
Make defaults from roles_data.yaml more robust
The previous logic left out the default Count completely when it was zero, which breaks nested validation and it's likely similar problems would exist with the other optional defaults, so rework it so the defaulting happens in the jinja2 logic, and document the interfaces better in roles_data.yaml Change-Id: I7f2eb4a3a0b43c5d2cd0d001ed3c73f783c95c74 Closes-Bug: #1625760
Diffstat (limited to 'overcloud.j2.yaml')
-rw-r--r--overcloud.j2.yaml10
1 files changed, 4 insertions, 6 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index 187741ff..aad1af62 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -121,16 +121,12 @@ parameters:
resource_registry) which represent nested stacks
for each service that should get installed on the {{role.name}} role.
type: comma_delimited_list
- {% if role.ServicesDefault %}
- default: {{role.ServicesDefault}}
- {% endif %}
+ default: {{role.ServicesDefault|default([])}}
{{role.name}}Count:
description: Number of {{role.name}} nodes to deploy
type: number
- {% if role.CountDefault %}
- default: {{role.CountDefault}}
- {% endif %}
+ default: {{role.CountDefault|default(0)}}
{{role.name}}HostnameFormat:
type: string
@@ -140,6 +136,8 @@ parameters:
and %stackname% is replaced with the stack name e.g overcloud
{% if role.HostnameFormatDefault %}
default: "{{role.HostnameFormatDefault}}"
+ {% else %}
+ default: "%stackname%-{{role.name.lower()}}-%index%"
{% endif %}
{{role.name}}RemovalPolicies: