blob: 00454b5933508b9e8d8237f8266438031c99fb8f [file] [log] [blame]
Matteo Scandolo55bb0962017-12-20 16:06:19 -08001---
Matteo Scandolo3896c472017-08-01 13:31:42 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Zack Williamsa2763112017-01-03 11:38:38 -070016# xos-config/tasks/main.yml
Scott Bakere0a80892016-11-23 12:07:07 -080017
Matteo Scandolo55bb0962017-12-20 16:06:19 -080018- name: Bootstrap XOS database - create site, deployment, admin user
19 uri:
20 url: "{{ xos_tosca_url }}/run"
21 method: POST
22 headers:
23 xos-username: "{{ xos_admin_user }}"
24 xos-password: "{{ head_xos_admin_pass }}"
25 body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
26 status_code: 200
27 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070028 until: result is success
Scott Baker3f24f642018-01-22 11:38:20 -080029 retries: 50
30 delay: 5
Matteo Scandolo55bb0962017-12-20 16:06:19 -080031 with_items:
32 - "fixtures.yaml"
33 - "deployment.yaml"
Matteo Scandolob92469d2017-07-28 17:32:00 -070034
Matteo Scandolo55bb0962017-12-20 16:06:19 -080035- name: Configure XOS with OpenStack config
36 uri:
37 url: "{{ xos_tosca_url }}/run"
38 method: POST
39 headers:
40 xos-username: "{{ xos_admin_user }}"
41 xos-password: "{{ head_xos_admin_pass }}"
42 body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
43 status_code: 200
44 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070045 until: result is success
Scott Baker3f24f642018-01-22 11:38:20 -080046 retries: 50
47 delay: 5
Matteo Scandolo55bb0962017-12-20 16:06:19 -080048 with_items:
49 - openstack.yaml
Andy Bavier9e7d54a2017-04-17 11:37:02 -040050
Matteo Scandolo55bb0962017-12-20 16:06:19 -080051- name: Configure XOS with profile specific TOSCA (new Engine)
52 uri:
53 url: "{{ xos_tosca_url }}/run"
54 method: POST
55 headers:
56 xos-username: "{{ xos_admin_user }}"
57 xos-password: "{{ head_xos_admin_pass }}"
58 body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
59 status_code: 200
60 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070061 until: result is success
Scott Baker3f24f642018-01-22 11:38:20 -080062 retries: 50
63 delay: 5
Andy Bavierd6144ee2018-02-01 15:58:06 -070064 with_items: "{{ xos_tosca_config_templates + xos_new_tosca_config_templates }}"