Zack Williams | b273a42 | 2016-05-18 13:33:00 -0700 | [diff] [blame] | 1 | --- |
Zack Williams | d31bbc9 | 2016-05-20 11:43:18 -0700 | [diff] [blame] | 2 | # docker-compose/tasks/main.yml |
Zack Williams | b273a42 | 2016-05-18 13:33:00 -0700 | [diff] [blame] | 3 | |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 4 | # The following two tests are equivalent and both evaluate to 0 when |
| 5 | # `onos-cord-1` VM isn't set to be created, but the `equalto` test only exists |
| 6 | # in Jinja v2.7.4, which is later than what's in Ubuntu 14.04 (v2.7.2). |
| 7 | # |
| 8 | # {{ head_vm_list | selectattr('name', 'equalto', 'onos-cord-1') | list | length }} |
| 9 | # {{ head_vm_list | map(attribute='name') | list | intersect(['onos-cord-1']) | list | length }} |
| 10 | |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 11 | #- name: Wait for onos_setup_playbook to complete |
| 12 | # when: "{{ head_vm_list | map(attribute='name') | list | intersect(['onos-cord-1']) | list | length }}" |
| 13 | # async_status: jid={{ onos_setup_playbook.ansible_job_id }} |
| 14 | # register: onos_setup_playbook_result |
| 15 | # until: onos_setup_playbook_result.finished |
Scott Baker | db5c8c7 | 2016-11-08 08:40:06 -0800 | [diff] [blame] | 16 | # delay: 10 |
| 17 | # retries: 120 |
Zack Williams | d31bbc9 | 2016-05-20 11:43:18 -0700 | [diff] [blame] | 18 | |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 19 | #- name: Copy SSL Certs to ONOS so docker-compose can find it |
| 20 | # when: "{{ head_vm_list | map(attribute='name') | list | intersect(['onos-cord-1']) | list | length }}" |
| 21 | # command: ansible onos-cord-1 -u ubuntu -m copy \ |
| 22 | # -a "src=/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt dest=~/cord/xos-certs.crt" |
| 23 | |
| 24 | #- name: Build ONOS image with docker-compose |
| 25 | # when: "{{ head_vm_list | map(attribute='name') | list | intersect(['onos-cord-1']) | list | length }}" |
| 26 | # command: ansible onos-cord-1 -u ubuntu -m command \ |
| 27 | # -a "docker-compose build chdir=cord" |
| 28 | |
| 29 | #- name: Start ONOS |
| 30 | # when: "{{ head_vm_list | map(attribute='name') | list | intersect(['onos-cord-1']) | list | length }}" |
| 31 | # command: ansible onos-cord-1:onos-fabric-1 -u ubuntu -m command \ |
| 32 | # -a "docker-compose up -d chdir=cord" |
Scott Baker | db5c8c7 | 2016-11-08 08:40:06 -0800 | [diff] [blame] | 33 | |
Zack Williams | a3e4056 | 2016-07-05 12:05:39 -0700 | [diff] [blame] | 34 | - name: Wait for test client to complete installation |
David K. Bainbridge | 467591e | 2016-07-06 18:49:55 -0700 | [diff] [blame] | 35 | when: test_client_install is defined and test_client_install |
Zack Williams | a3e4056 | 2016-07-05 12:05:39 -0700 | [diff] [blame] | 36 | async_status: jid={{ test_client_playbook.ansible_job_id }} |
| 37 | register: test_client_playbook_result |
| 38 | until: test_client_playbook_result.finished |
| 39 | delay: 10 |
| 40 | retries: 120 |
| 41 | |