blob: fe33054bcb6849ddca7f8000dcf945421ead6518 [file] [log] [blame]
Zack Williams363bc852016-04-12 13:58:29 -07001---
Andy Bavierf69e77c2016-06-28 17:19:33 -04002# Common ONOS setup
3- hosts: onos-cord-1:onos-fabric-1
Zack Williams363bc852016-04-12 13:58:29 -07004 remote_user: ubuntu
5
6 tasks:
7 - name: Include configuration vars
8 include_vars: onos-setup-vars.yml
9
Zack Williams9b3c3612016-04-14 07:05:30 -070010 - name: Create CORD directory
11 file:
Zack Williams2b946292016-08-22 15:32:29 -070012 path: "{{ ansible_user_dir }}/cord"
13 state: directory
Zack Williams9b3c3612016-04-14 07:05:30 -070014
Zack Williams2b946292016-08-22 15:32:29 -070015# Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable
Andy Bavierf69e77c2016-06-28 17:19:33 -040016 - name: Pull docker image for ONOS
17 become: yes
Zack Williams2b946292016-08-22 15:32:29 -070018 command: "docker pull {{ onos_docker_image }}"
Andy Bavierf69e77c2016-06-28 17:19:33 -040019
20# Setup specific for onos-cord VM
21- hosts: onos-cord-1
22 remote_user: ubuntu
23
24 tasks:
Andy Bavierd39936c2016-08-02 17:31:07 -040025 - name: Copy over SSH key
Zack Williams363bc852016-04-12 13:58:29 -070026 copy:
Zack Williams2b946292016-08-22 15:32:29 -070027 src: "{{ node_private_key }}"
28 dest: "{{ ansible_user_dir }}/cord/node_key"
29 owner: "{{ ansible_user_id }}"
30 mode: 0600
Zack Williams363bc852016-04-12 13:58:29 -070031
Zack Williams2a287092016-05-18 13:41:31 -070032 - name: Copy over files to build XOS variant of ONOS
33 copy:
Zack Williams2b946292016-08-22 15:32:29 -070034 src: "~/{{ item }}"
35 dest: "{{ ansible_user_dir }}/cord/{{ item }}"
Zack Williams2a287092016-05-18 13:41:31 -070036 with_items:
37 - Dockerfile.xos-onos
38 - onos-service
39
Zack Williamse4fbacc2016-05-21 07:18:43 -070040 - name: Copy over & rename docker-compose file
Zack Williams363bc852016-04-12 13:58:29 -070041 copy:
Zack Williams2b946292016-08-22 15:32:29 -070042 src: "~/onos-docker-compose.yml"
43 dest: "{{ ansible_user_dir }}/cord/docker-compose.yml"
Zack Williams363bc852016-04-12 13:58:29 -070044
Andy Bavierf69e77c2016-06-28 17:19:33 -040045- hosts: onos-fabric-1
46 remote_user: ubuntu
Zack Williamsd31bbc92016-05-20 11:43:18 -070047
Andy Bavierf69e77c2016-06-28 17:19:33 -040048 tasks:
49 - name: Copy over & rename docker-compose file
50 copy:
Zack Williams2b946292016-08-22 15:32:29 -070051 src: "~/fabric-docker-compose.yml"
52 dest: "{{ ansible_user_dir }}/cord/docker-compose.yml"