Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 1 | --- |
| 2 | # exampleservice-onboard/tasks/main.yml |
| 3 | |
| 4 | - name: Disable onboarding |
| 5 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/disable-onboarding.yaml" |
| 6 | tags: |
| 7 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 8 | |
| 9 | - name: Have XOS container mount exampleservice volume |
| 10 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/xos-exampleservice.yaml" |
| 11 | tags: |
| 12 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 13 | |
| 14 | - name: Onboard exampleservice |
| 15 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/exampleservice-onboard.yaml" |
| 16 | tags: |
| 17 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 18 | |
| 19 | - name: Enable onboarding |
| 20 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/enable-onboarding.yaml" |
| 21 | tags: |
| 22 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 23 | |
| 24 | - name: Wait for exampleservice to be onboarded |
| 25 | uri: |
| 26 | url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/services/exampleservice/ready/" |
| 27 | method: GET |
| 28 | return_content: yes |
| 29 | register: xos_onboard_status |
| 30 | until: '"true" in xos_onboard_status.content' |
| 31 | retries: 60 |
Zack Williams | 0c554ce | 2017-02-22 13:56:03 -0700 | [diff] [blame] | 32 | delay: 10 |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 33 | |
| 34 | - name: Wait for XOS to be onboarded after exampleservice 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 |
Zack Williams | 0c554ce | 2017-02-22 13:56:03 -0700 | [diff] [blame] | 42 | delay: 10 |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 43 | |