Fix initial_data to not have a dupe Site object, and execution context
of xosready
Change-Id: Iabdca624a83986e777fe72b006b0c21654deea8b
diff --git a/onboard-openstack-playbook.yml b/onboard-openstack-playbook.yml
index 25ae515..60b9aa8 100644
--- a/onboard-openstack-playbook.yml
+++ b/onboard-openstack-playbook.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,17 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# onboard-openstack-playbook.yml
# Onboard Openstack into XOS
+- name: Check to see if XOS is ready
+ hosts: head
+ roles:
+ - xos-ready
+
- include: add-onboard-containers-playbook.yml
-- name: Check to see if XOS UI is ready, apply profile config
+- name: Enable compute nodes
hosts: xos_ui
connection: docker
roles:
- - xos-ready
- compute-node-enable
diff --git a/roles/cord-profile/templates/initial_data.yaml.j2 b/roles/cord-profile/templates/initial_data.yaml.j2
index 4433c2b..0017cfc 100644
--- a/roles/cord-profile/templates/initial_data.yaml.j2
+++ b/roles/cord-profile/templates/initial_data.yaml.j2
@@ -17,36 +17,40 @@
# Site
- model: core.Site
fields:
- name: {{ site_name }}
- site_url: http://{{ site_name }}.opencloud.us/
+ name: "{{ site_humanname }}"
+ abbreviated_name: "{{ site_name }}"
+ login_base: "{{ site_name }}"
+ site_url: "http://{{ site_name }}.opencloud.us/"
hosts_nodes: true
# User
- model: core.User
fields:
- email: {{ xos_admin_user }}
- password: {{ xos_admin_pass }}
- firstname: {{ xos_admin_first }}
- lastname: {{ xos_admin_last }}
+ email: "{{ xos_admin_user }}"
+ password: "{{ xos_admin_pass }}"
+ firstname: "{{ xos_admin_first }}"
+ lastname: "{{ xos_admin_last }}"
is_admin: True
relations:
site:
fields:
- name: {{ site_name }}
+ name: "{{ site_humanname }}"
model: core.Site
# All other users
{% for user in xos_users %}
- model: core.User
fields:
- email: {{ user.email }}
- password: {{ user.password }}
- firstname: {{ user.first | default(user.email) }}
- lastname: {{ user.last | default("unknown") }}
- is_admin: {{ user.admin | default("false") }}
+ email: "{{ user.email }}"
+ password: "{{ user.password }}"
+ firstname: "{{ user.first | default(user.email) }}"
+ lastname: "{{ user.last | default("unknown") }}"
+ is_admin: "{{ user.admin | default("false") }}"
relations:
site:
fields:
- name: {{ site_name }}
+ name: "{{ site_humanname }}"
model: core.Site
-{% endfor %}
\ No newline at end of file
+
+{% endfor %}
+