Zack Williams | 2d325cb | 2017-10-23 11:21:05 -0700 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3fc188e | 2017-10-02 18:05:58 -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 | |
Matteo Scandolo | 3fc188e | 2017-10-02 18:05:58 -0700 | [diff] [blame] | 16 | # xos-config-new-tosca/tasks/main.yml |
| 17 | |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -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 }}" |
Zack Williams | fc6b64b | 2017-12-22 15:57:50 -0700 | [diff] [blame] | 24 | xos-password: "{{ head_xos_admin_pass }}" |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 25 | body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}" |
| 26 | status_code: 200 |
| 27 | with_items: |
| 28 | - "fixtures.yaml" |
| 29 | - "deployment.yaml" |
| 30 | tags: |
| 31 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 32 | |
| 33 | - name: Configure XOS with OpenStack config |
| 34 | uri: |
| 35 | url: "{{ xos_tosca_url }}/run" |
| 36 | method: POST |
| 37 | headers: |
| 38 | xos-username: "{{ xos_admin_user }}" |
Zack Williams | fc6b64b | 2017-12-22 15:57:50 -0700 | [diff] [blame] | 39 | xos-password: "{{ head_xos_admin_pass }}" |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 40 | body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}" |
| 41 | status_code: 200 |
| 42 | with_items: |
| 43 | - openstack.yaml |
| 44 | tags: |
| 45 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 46 | |
Matteo Scandolo | 3fc188e | 2017-10-02 18:05:58 -0700 | [diff] [blame] | 47 | - name: Configure XOS with profile specific TOSCA (new Engine) |
| 48 | uri: |
Matteo Scandolo | 7831f80 | 2017-11-28 16:46:30 -0800 | [diff] [blame] | 49 | url: "{{ xos_tosca_url }}/run" |
Matteo Scandolo | 3fc188e | 2017-10-02 18:05:58 -0700 | [diff] [blame] | 50 | method: POST |
| 51 | headers: |
| 52 | xos-username: "{{ xos_admin_user }}" |
Zack Williams | fc6b64b | 2017-12-22 15:57:50 -0700 | [diff] [blame] | 53 | xos-password: "{{ head_xos_admin_pass }}" |
Matteo Scandolo | 7831f80 | 2017-11-28 16:46:30 -0800 | [diff] [blame] | 54 | body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}" |
Matteo Scandolo | 3fc188e | 2017-10-02 18:05:58 -0700 | [diff] [blame] | 55 | status_code: 200 |
| 56 | with_items: "{{ xos_new_tosca_config_templates }}" |
| 57 | tags: |
| 58 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 59 | |