blob: b11cef0c2573f48b595d4ca53d87ea3e13cd39cd [file] [log] [blame]
Zack Williams2d325cb2017-10-23 11:21:05 -07001---
Matteo Scandolo3fc188e2017-10-02 18:05:58 -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
Matteo Scandolo3fc188e2017-10-02 18:05:58 -070016# xos-config-new-tosca/tasks/main.yml
17
Matteo Scandolo1ed76b82017-12-05 13:58:22 -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 }}"
Zack Williamsfc6b64b2017-12-22 15:57:50 -070024 xos-password: "{{ head_xos_admin_pass }}"
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080025 body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
26 status_code: 200
Scott Baker70d73c12018-01-04 09:07:00 -080027 register: result
28 until: result | success
29 retries: 40
30 delay: 2
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080031 with_items:
32 - "fixtures.yaml"
33 - "deployment.yaml"
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080034
35- 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 }}"
Zack Williamsfc6b64b2017-12-22 15:57:50 -070041 xos-password: "{{ head_xos_admin_pass }}"
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080042 body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
43 status_code: 200
Scott Baker70d73c12018-01-04 09:07:00 -080044 register: result
45 until: result | success
46 retries: 40
47 delay: 2
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080048 with_items:
49 - openstack.yaml
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080050
Matteo Scandolo3fc188e2017-10-02 18:05:58 -070051- name: Configure XOS with profile specific TOSCA (new Engine)
52 uri:
Matteo Scandolo7831f802017-11-28 16:46:30 -080053 url: "{{ xos_tosca_url }}/run"
Matteo Scandolo3fc188e2017-10-02 18:05:58 -070054 method: POST
55 headers:
56 xos-username: "{{ xos_admin_user }}"
Zack Williamsfc6b64b2017-12-22 15:57:50 -070057 xos-password: "{{ head_xos_admin_pass }}"
Matteo Scandolo7831f802017-11-28 16:46:30 -080058 body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
Matteo Scandolo3fc188e2017-10-02 18:05:58 -070059 status_code: 200
Scott Baker70d73c12018-01-04 09:07:00 -080060 register: result
61 until: result | success
62 retries: 40
63 delay: 2
Matteo Scandolo3fc188e2017-10-02 18:05:58 -070064 with_items: "{{ xos_new_tosca_config_templates }}"