blob: 7d67c887fed66150c5614ee7f7df71de7fd9a952 [file] [log] [blame]
Scott Baker58e88a82016-11-18 13:39:09 -08001---
2# Common ONOS setup
3
4- name: Pull docker image for ONOS
5 become: yes
6 command: "docker pull {{ onos_docker_image }}"
7 tags:
8 - skip_ansible_lint # Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable
9
10- name: Create dest directory
11 file: path="{{ onos_fabric_dest }}" state=directory
12
13- name: Create templated ONOS files
14 template:
15 src: "{{ item }}.j2"
16 dest: "{{ onos_fabric_dest }}/{{ item }}"
17 with_items:
18 - Dockerfile
19 - onos-service
20
21- name: Copy over ONOS playbook and other files
22 copy:
23 src: "onos-fabric-docker-compose.yml"
24 dest: "{{ onos_fabric_dest }}/docker-compose.yml"
25
26# TODO: Find the proper place for this on the dev machine rather than
27# copying it within the head node machine.
28
29- name: Copy SSL Certs to ONOS so docker-compose can find it
30 copy:
31 src: "/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt"
32 dest: "{{ onos_fabric_dest }}/xos-certs.crt"
33 owner: "{{ ansible_user_id }}"
34 remote_src: True
35
36# Note: we do not rebuild onos container for the fabric
37
38- name: Start ONOS
39 command: chdir="{{ onos_fabric_dest }}" docker-compose up -d
40 tags:
41 - skip_ansible_lint
42