blob: c1156f8045b55bb5368f89c936c3b3b6d6848876 [file] [log] [blame]
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +00001---
2# monitoringservice-onboard/tasks/main.yml
3
4- name: Disable onboarding
Zack Williamsc989f262017-05-11 13:02:59 -07005 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/disable-onboarding.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +00006 tags:
7 - skip_ansible_lint # TOSCA loading should be idempotent
8
9- name: Have XOS container mount monitoringservice volume
Zack Williamsc989f262017-05-11 13:02:59 -070010 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/xos-monitoringservice.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000011 tags:
12 - skip_ansible_lint # TOSCA loading should be idempotent
13
14- name: Onboard monitoringservice
Zack Williamsc989f262017-05-11 13:02:59 -070015 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/monitoring-onboard.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000016 tags:
17 - skip_ansible_lint # TOSCA loading should be idempotent
18
19- name: Enable onboarding
Zack Williamsc989f262017-05-11 13:02:59 -070020 command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/enable-onboarding.yaml"
Srikanth Vavilapallia7ae6512017-02-13 02:29:21 +000021 tags:
22 - skip_ansible_lint # TOSCA loading should be idempotent
23
24- name: Wait for monitoring to be onboarded
25 uri:
26 url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/services/monitoring/ready/"
27 method: GET
28 return_content: yes
29 register: xos_onboard_status
30 until: '"true" in xos_onboard_status.content'
31 retries: 60
32 delay: 2
33
34- name: Wait for XOS to be onboarded after monitoringservice onboarding
35 uri:
36 url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/xos/ready/"
37 method: GET
38 return_content: yes
39 register: xos_onboard_status
40 until: '"true" in xos_onboard_status.content'
41 retries: 60
42 delay: 2
43