aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-13 17:29:59 +0000
committerGerrit Code Review <review@openstack.org>2017-04-13 17:29:59 +0000
commit05440b00079628d31aaa8c08a797fe33af4d2889 (patch)
tree7e7af00a23844902c06eb61e8c76febf3912f96c /docker
parent837deb91b2173720dc15d5ec33d78b2192f7511d (diff)
parentbe274f1f49a15aad118a92107b7d04a57a037092 (diff)
Merge "Add tags to roles"
Diffstat (limited to 'docker')
-rw-r--r--docker/docker-steps.j213
1 files changed, 10 insertions, 3 deletions
diff --git a/docker/docker-steps.j2 b/docker/docker-steps.j2
index 301d838f..f0af8e25 100644
--- a/docker/docker-steps.j2
+++ b/docker/docker-steps.j2
@@ -1,7 +1,14 @@
# certain initialization steps (run in a container) will occur
-# on the first role listed in the roles file
-{% set primary_role_name = roles[0].name -%}
-
+# on the role marked as primary controller or the first role listed
+{%- set primary_role = [roles[0]] -%}
+{%- for role in roles -%}
+ {%- if 'primary' in role.tags and 'controller' in role.tags -%}
+ {%- set _ = primary_role.pop() -%}
+ {%- set _ = primary_role.append(role) -%}
+ {%- endif -%}
+{%- endfor -%}
+{%- set primary_role_name = primary_role[0].name -%}
+# primary role is: {{primary_role_name}}
heat_template_version: ocata
description: >