Allow empty list of enabled_roles

This is the case when creating a compute-only stack with the default roles data

E.g:

openstack overcloud roles generate --roles-path tripleo-heat-templates/roles -o compute_only_roles_data.yaml Compute
openstack overcloud deploy --templates tripleo-heat-templates --stack compute1 -r compute_only_roles_data.yaml

Change-Id: I44e6450c1afe8fb972731e46b40fc2e63b320a5b
This commit is contained in:
Steven Hardy 2017-11-20 14:48:03 +00:00
parent 4609fab079
commit 30d602c999
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# certain initialization steps (run in a container) will occur
# on the role marked as primary controller or the first role listed
{%- if enabled_roles is not defined -%}
{%- if enabled_roles is not defined or enabled_roles == [] -%}
# On upgrade certain roles can be disabled for operator driven upgrades
# See major_upgrade_steps.j2.yaml and post-upgrade.j2.yaml
{%- set enabled_roles = roles -%}