Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 2 | # 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 Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 16 | # xos-config/tasks/main.yml |
Scott Baker | e0a8089 | 2016-11-23 12:07:07 -0800 | [diff] [blame] | 17 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame] | 18 | - 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 |
| 28 | until: result | success |
Scott Baker | 3f24f64 | 2018-01-22 11:38:20 -0800 | [diff] [blame] | 29 | retries: 50 |
| 30 | delay: 5 |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame] | 31 | with_items: |
| 32 | - "fixtures.yaml" |
| 33 | - "deployment.yaml" |
Matteo Scandolo | b92469d | 2017-07-28 17:32:00 -0700 | [diff] [blame] | 34 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame] | 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 }}" |
| 41 | xos-password: "{{ head_xos_admin_pass }}" |
| 42 | body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}" |
| 43 | status_code: 200 |
| 44 | register: result |
| 45 | until: result | success |
Scott Baker | 3f24f64 | 2018-01-22 11:38:20 -0800 | [diff] [blame] | 46 | retries: 50 |
| 47 | delay: 5 |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame] | 48 | with_items: |
| 49 | - openstack.yaml |
Andy Bavier | 9e7d54a | 2017-04-17 11:37:02 -0400 | [diff] [blame] | 50 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame] | 51 | - 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 |
| 61 | until: result | success |
Scott Baker | 3f24f64 | 2018-01-22 11:38:20 -0800 | [diff] [blame] | 62 | retries: 50 |
| 63 | delay: 5 |
Andy Bavier | d6144ee | 2018-02-01 15:58:06 -0700 | [diff] [blame] | 64 | with_items: "{{ xos_tosca_config_templates + xos_new_tosca_config_templates }}" |