blob: 85b8c1494fdcf6bb6d8b441c8e5dafcf5142ecae [file] [log] [blame]
Zack Williamsb273a422016-05-18 13:33:00 -07001---
Zack Williamsd31bbc92016-05-20 11:43:18 -07002# docker-compose/tasks/main.yml
Zack Williamsb273a422016-05-18 13:33:00 -07003
Zack Williams6f5a6e72016-08-10 17:45:27 -07004# 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 Baker58e88a82016-11-18 13:39:09 -080011#- 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 Bakerdb5c8c72016-11-08 08:40:06 -080016# delay: 10
17# retries: 120
Zack Williamsd31bbc92016-05-20 11:43:18 -070018
Scott Baker58e88a82016-11-18 13:39:09 -080019#- 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 Bakerdb5c8c72016-11-08 08:40:06 -080033
Zack Williamsa3e40562016-07-05 12:05:39 -070034- name: Wait for test client to complete installation
David K. Bainbridge467591e2016-07-06 18:49:55 -070035 when: test_client_install is defined and test_client_install
Zack Williamsa3e40562016-07-05 12:05:39 -070036 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