blob: 718329323d7c188b62292c685ee030bc77d48807 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
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
16
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000017---
18# monitoringservice-onboard/tasks/main.yml
19
20- name: Disable onboarding
Zack Williamsc989f262017-05-11 13:02:59 -070021 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/disable-onboarding.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000022 tags:
23 - skip_ansible_lint # TOSCA loading should be idempotent
24
25- name: Have XOS container mount monitoringservice volume
Zack Williamsc989f262017-05-11 13:02:59 -070026 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/xos-monitoringservice.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000027 tags:
28 - skip_ansible_lint # TOSCA loading should be idempotent
29
30- name: Onboard monitoringservice
Zack Williamsc989f262017-05-11 13:02:59 -070031 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/monitoring-onboard.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000032 tags:
33 - skip_ansible_lint # TOSCA loading should be idempotent
34
35- name: Enable onboarding
Zack Williamsc989f262017-05-11 13:02:59 -070036 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/enable-onboarding.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000037 tags:
38 - skip_ansible_lint # TOSCA loading should be idempotent
39
40- name: Wait for monitoring to be onboarded
41 uri:
42 url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/services/monitoring/ready/"
43 method: GET
44 return_content: yes
45 register: xos_onboard_status
46 until: '"true" in xos_onboard_status.content'
47 retries: 60
48 delay: 2
49
50- name: Wait for XOS to be onboarded after monitoringservice onboarding
51 uri:
52 url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/xos/ready/"
53 method: GET
54 return_content: yes
55 register: xos_onboard_status
56 until: '"true" in xos_onboard_status.content'
57 retries: 60
58 delay: 2
59