blob: 56bf06e3c359c7bdcfee786246fccd5a642c956e [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
Andy Bavierf69e77c2016-06-28 17:19:33 -040015 - name: Pull docker image for ONOS
16 become: yes
Zack Williams2b946292016-08-22 15:32:29 -070017 command: "docker pull {{ onos_docker_image }}"
Zack Williams35624562016-08-28 17:12:26 -070018 tags:
19 - skip_ansible_lint # Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable
Andy Bavierf69e77c2016-06-28 17:19:33 -040020
21# Setup specific for onos-cord VM
22- hosts: onos-cord-1
23 remote_user: ubuntu
24
25 tasks:
Andy Bavierd39936c2016-08-02 17:31:07 -040026 - name: Copy over SSH key
Zack Williams363bc852016-04-12 13:58:29 -070027 copy:
Zack Williams2b946292016-08-22 15:32:29 -070028 src: "{{ node_private_key }}"
29 dest: "{{ ansible_user_dir }}/cord/node_key"
30 owner: "{{ ansible_user_id }}"
31 mode: 0600
Zack Williams363bc852016-04-12 13:58:29 -070032
Zack Williams2a287092016-05-18 13:41:31 -070033 - name: Copy over files to build XOS variant of ONOS
34 copy:
Zack Williams2b946292016-08-22 15:32:29 -070035 src: "~/{{ item }}"
36 dest: "{{ ansible_user_dir }}/cord/{{ item }}"
Zack Williams2a287092016-05-18 13:41:31 -070037 with_items:
38 - Dockerfile.xos-onos
39 - onos-service
40
Zack Williamse4fbacc2016-05-21 07:18:43 -070041 - name: Copy over & rename docker-compose file
Zack Williams363bc852016-04-12 13:58:29 -070042 copy:
Zack Williams2b946292016-08-22 15:32:29 -070043 src: "~/onos-docker-compose.yml"
44 dest: "{{ ansible_user_dir }}/cord/docker-compose.yml"
Zack Williams363bc852016-04-12 13:58:29 -070045
Andy Bavierf69e77c2016-06-28 17:19:33 -040046- hosts: onos-fabric-1
47 remote_user: ubuntu
Zack Williamsd31bbc92016-05-20 11:43:18 -070048
Andy Bavierf69e77c2016-06-28 17:19:33 -040049 tasks:
50 - name: Copy over & rename docker-compose file
51 copy:
Zack Williams2b946292016-08-22 15:32:29 -070052 src: "~/fabric-docker-compose.yml"
53 dest: "{{ ansible_user_dir }}/cord/docker-compose.yml"